From 382ae114123eafea8be3d4465e17fe7c9dd20e48 Mon Sep 17 00:00:00 2001 From: Paolo Lazzari Date: Mon, 25 Aug 2025 13:18:40 +0200 Subject: [PATCH 01/97] Adding preliminary example to couple with FABM --- src/BIO/FABM/trcbio.f90 | 329 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 329 insertions(+) create mode 100644 src/BIO/FABM/trcbio.f90 diff --git a/src/BIO/FABM/trcbio.f90 b/src/BIO/FABM/trcbio.f90 new file mode 100644 index 00000000..eed4cb3b --- /dev/null +++ b/src/BIO/FABM/trcbio.f90 @@ -0,0 +1,329 @@ + + SUBROUTINE trcbio +!!!--------------------------------------------------------------------- +!!! +!!! ROUTINE trcbio +!!! ******************* +!!! +!!! PURPOSE : +!!! --------- +!!! compute the now trend due to biogeochemical processes +!!! and add it to the general trend of passive tracers equations. +!!! +!!! Three options: +!!! +!!! METHOD : +!!! ------- +!!! each now biological flux is calculated in FUNCTION of now +!!! concentrations of tracers. +!!! depending on the tracer, these fluxes are sources or sinks. +!!! the total of the sources and sinks for each tracer +!!! is added to the general trend. +!!! +!!! tra = tra + zf...tra - zftra... +!!! | | +!!! | | +!!! source sink +!!! +!!! +!!! IF 'key_trc_diabio' key is activated, the biogeochemical +!!! trends for passive tracers are saved for futher diagnostics. +!!! +!!! multitasked on vertical slab (jj-loop) +!!! +!!! MODIFICATIONS: +!!! -------------- + + USE myalloc + USE BIO_mem + USE BC_mem + USE mpi + + +!!! FABM IMPLEMENTATION + USE fabm +! --------------------------------------------------------------------- + +! ---------------------------------------------------------------------- +! BEGIN BC_REFACTORING SECTION +! --------------------------------------------------------------------- + + use bc_set_mod + +! ---------------------------------------------------------------------- +! END BC_REFACTORING SECTION +! --------------------------------------------------------------------- + +#ifdef ExecEnsParams + use Ens_Mem, & + only: UseParams + use Ens_Params, & + only: Ens_SetParams_trcbio +#endif + + IMPLICIT NONE + + +!!!---------------------------------------------------------------------- +!!! local declarations +!!! ================== + + double precision,dimension(jptra,jpk) :: b + double precision,dimension(jpk,jptra) :: a + double precision,dimension(4,jpk) :: c + double precision,dimension(jptra_dia,jpk) :: d + double precision,dimension(jpk,11) :: er + double precision,dimension(jptra_dia_2d) :: d2 + + + integer :: jk,jj,ji,jb,jn + integer :: jtr,jtrmax,tra_idx + integer :: bottom + double precision :: correct_fact + +!!! FABM IMPLEMENTATION + class (type_fabm_model), pointer :: model + + ! Initialize (reads FABM configuration from fabm.yaml) + ! After this the number of biogeochemical variables is fixed. + ! (access variable metadata in model%interior_state_variables, model%interior_diagnostic_variables) + model => fabm_create_model() + +! --------------------------------------------------------------------- + + +!!!---------------------------------------------------------------------- +!!! statement functions +!!! =================== + + +! | --------------| +! | BFM MODEL CALL| +! | --------------| + + BIOparttime = MPI_WTIME() + + surf_mask(:) = 0. + surf_mask(1) = 1. +! ------------------------------------------------- + + ! tra_idx = tra_matrix_gib(1) + jtrmax=jptra + +! ---------------- Fuori dai punti BFM + + ogstm_sediPI=0. + tra_DIA = 0. + tra_DIA_2d = 0. ! da sistemare + + +! Initialization + a = 1.0 + er = 1.0 + er(:,10) = 8.1 + + +#ifdef gdept1d +! er(:,11) is calculated outside the loop on ji,jj + do jk=1, jpk + correct_fact= 1.0D0 + + if ( (gdept(jk) .GT. 1000.0D0 ) .AND. (gdept(jk) .LT. 2000.0D0 )) then + correct_fact= 0.25D0 + endif + + if (gdept(jk) .GE. 2000.0D0 ) then + correct_fact= 0.0D0 + endif + + er(jk,11) = correct_fact * ( gdept(jpk)-gdept(jk) ) /gdept(jpk) + enddo +#endif + + + DO ji=1,jpi + DO jj=1,jpj + if (bfmmask(1,jj,ji) == 0) CYCLE + bottom = mbathy(jj,ji) + +!!! FABM IMPLEMENTATION + ! Provide extents of the spatial domain (number of layers nz for a 1D column) +! call model%set_domain(nz) !maybe nz is jpk or bottom in ogstm + call model%set_domain(jpk) + +! At this point (after the call to fabm_create_model), memory should be +! allocated to hold the values of all size(model%interior_state_variables) state variables. +! Where this memory resides and how it is laid out is typically host-specific. +! Below, we assume all state variable values are combined in an array interior_state with +! shape nz,size(model%interior_state_variables). + + ! Point FABM to your state variable data +! real, dimension(:,:), target, allocatable :: interior_state +! allocate(interior_state (nz, size(model%interior_state_variables)) + ! interior_state is "a" in the original ogstm-bfm coupling + ! size(model%interior_state_variables) is "jptra" in the original ogstm-bfm coupling +! do ivar = 1, size(model%interior_state_variables) + DO ivar = 1, jptra + call model%link_interior_state_data(ivar, a(ivar,:)) ! current biogeochemical concentrations + END DO +! --------------------------------------------------------------------- + +#ifdef ExecEnsParams + if (UseParams) call Ens_SetParams_trcbio(jj, ji) +#endif + + +! DO jtr=1, jtrmax + +! a(1:bottom, jtr) = trn(1:bottom,jj,ji,jtr) ! current biogeochemical concentrations + +! END DO + +! Environmental regulating factors (er,:) + +!!! FABM IMPLEMENTATION + +! Point FABM to environmental data, here shown for temperature +! Array temp(1:nz) is assumed to be allocated. +! Do this for all variables on FABM's standard variable list that the model can provide. +! For this list, visit https://fabm.net/standard_variables +! call model%link_interior_data(fabm_standard_variables%temperature, temp) example + +! if in a loop better another approach, see wiki + +call model%link_interior_data(fabm_standard_variables%temperature, tn(1:bottom,jj,ji)) ! Temperature (Celsius) +call model%link_interior_data(fabm_standard_variables%practical_salinity, sn(1:bottom,jj,ji)) ! salinity PSU +call model%link_interior_data(fabm_standard_variables%density, rho(1:bottom,jj,ji)) ! Density Kg/m3 +call model%link_horizontal_data(fabm_standard_variables%ice_area_fraction, ice) ! from 0 to 1 adimensional +call model%link_horizontal_data(fabm_standard_variables%mole_fraction_of_carbon_dioxide_in_air, ogstm_co2(jj,ji)) ! CO2 Mixing Ratios (ppm) 390 +call model%link_interior_data(fabm_standard_variables%depth, e3t(1:bottom,jj,ji)) ! depth in meters of the given cell +call model%link_horizontal_data(fabm_standard_variables%wind_speed, vatm(jj,ji)) ! depth in meters of the given cell +call model%link_interior_data(fabm_standard_variables%ph_reported_on_total_scale, ogstm_PH(1:bottom,jj,ji)) ! 8.1 +!how to do it in fabm? +!do jk=1, bottom +! er(jk,6) = instant_par(COMMON_DATEstring,xpar(jk,jj,ji)) ! PAR umoles/m2/s | Watt to umoles photons W2E=1./0.217 +!enddo +!er(1 ,7) = DAY_LENGTH(jj,ji) ! fotoperiod expressed in hours + +! --------------------------------------------------------------------- + +! er(1:bottom,1) = tn (1:bottom,jj,ji)! Temperature (Celsius) +! er(1:bottom,2) = sn (1:bottom,jj,ji) ! Salinity PSU +! er(1:bottom,3) = rho(1:bottom,jj,ji) ! Density Kg/m3 +! er(1 ,4) = ice ! from 0 to 1 adimensional +! er(1 ,5) = ogstm_co2(jj,ji) ! CO2 Mixing Ratios (ppm) 390 +! do jk=1, bottom +! er(jk,6) = instant_par(COMMON_DATEstring,xpar(jk,jj,ji)) ! PAR umoles/m2/s | Watt to umoles photons W2E=1./0.217 +! enddo +! !if (is_night(COMMON_DATEstring)) then +! ! er(1:bottom,6) = 0.001 +! !else +! ! er(1:bottom,6) = 2.0*xpar(1:bottom,jj,ji) +! !endif +! !write(*,*) 'XPAR', er(1,6) + +! er(1 ,7) = DAY_LENGTH(jj,ji) ! fotoperiod expressed in hours +! er(1:bottom,8) = e3t(1:bottom,jj,ji) ! depth in meters of the given cell +! er(1 ,9) = vatm(jj,ji) ! wind speed (m/s) +! er(1:bottom,10) = ogstm_PH(1:bottom,jj,ji) ! 8.1 + +#ifndef gdept1d + do jk=1,bottom + correct_fact= 1.0D0 + if ( (gdept(jk,jj,ji) .GT. 1000.0D0 ) .AND. (gdept(jk,jj,ji) .LT. 2000.0D0)) then + correct_fact= 0.25D0 + endif + + if (gdept(jk,jj,ji) .GE. 2000.0D0 ) then + correct_fact= 0.0D0 + endif + + er(jk,11) = correct_fact * ( gdept(jpk,jj,ji)-gdept(jk,jj,ji) ) /gdept(jpk,jj,ji) + enddo +#endif + +!!! FABM IMPLEMENTATION + ! Complete initialization and check whether FABM has all dependencies fulfilled + ! (i.e., whether all required calls to model%link_*_data have been made) + call model%start() + + ! Initialize the tracers + ! This sets the values of arrays sent to model%link_interior_state_data, + ! in this case those contained in interior_state. + call model%initialize_interior_state(1, jpk) + + ! At this point, initialization is complete. + ! Routines below would typically be called every time step. + + ! Prepare all fields FABM needs to compute source terms (e.g., light) + call model%prepare_inputs() + + ! Retrieve tracer source terms (tracer units s-1). + ! Array dy(1:nz,1:size(model%interior_state_variables)) is assumed to be allocated. + !dy = 0 + !call model%get_interior_sources(1, nz, dy) +! real(rk) :: b(jpk,size(model%interior_state_variables)) + real(rk) :: b(jtrmax,jpk) + b = 0 + call model%get_interior_sources(1, jpk, b) + + ! Compute any remaining diagnostics + call model%finalize_outputs() + + + ! Retrieve vertical velocities (sinking, floating, active movement) in m s-1. + ! Array w(1:nz, 1:size(model%interior_state_variables)) is assumed to be allocated. + + !call model%get_vertical_movement(1, nz, w) not needed in bfm? + ! Here you would time-integrate the advection-diffusion-reaction equations + ! of all tracers, combining the transport terms with the biogeochemical source + ! terms dy and vertical velocities w. This should result in an updated interior_state. + +! --------------------------------------------------------------------- + + +! call BFM1D_Input_EcologyDynamics(bottom,a,jtrmax,er) + +! call BFM1D_reset() + +! call EcologyDynamics() + +! call BFM1D_Output_EcologyDynamics(b, c, d, d2) + + DO jtr=1, jtrmax + tra(1:bottom,jj,ji,jtr) =tra(1:bottom,jj,ji,jtr) +b(jtr,1:bottom) ! trend + END DO + + DO jtr=1,4 + ogstm_sediPI(1:bottom,jj,ji,jtr) = c(jtr,1:bottom) ! BFM output of sedimentation speed (m/d) + END DO + + + DO jk = 1,bottom + DO jtr=1,jptra_dia + tra_DIA(jtr, jk ,jj,ji) = d(jtr,jk) ! diagnostic + END DO + ENDDO + + tra_DIA_2d(:,jj,ji) = d2(:) ! diagnostic + + ogstm_PH(1:bottom,jj,ji) = d(pppH,1:bottom) ! Follows solver guess, put 8.0 if pppH is not defined + + END DO + END DO + +! ---------------------------------------------------------------------- +! BEGIN BC_REFACTORING SECTION +! --------------------------------------------------------------------- + + call boundaries%fix_diagnostic_vars(tra_DIA, tra_DIA_2d) + +! ---------------------------------------------------------------------- +! END BC_REFACTORING SECTION +! --------------------------------------------------------------------- + + + BIOparttime = MPI_WTIME() -BIOparttime + BIOtottime = BIOtottime + BIOparttime + + END SUBROUTINE trcbio From ef9d147a2f6932ae176a9582ec3e5a2727c3c9e1 Mon Sep 17 00:00:00 2001 From: Marco-Puglia <60135413+Marco-Puglia@users.noreply.github.com> Date: Tue, 14 Oct 2025 14:11:20 +0200 Subject: [PATCH 02/97] Add leonardo.intel Add leonardo.intel file to make this branch work on Leonardo server. --- compilers/machine_modules/leonardo.intel | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 compilers/machine_modules/leonardo.intel diff --git a/compilers/machine_modules/leonardo.intel b/compilers/machine_modules/leonardo.intel new file mode 100644 index 00000000..2fddfc7e --- /dev/null +++ b/compilers/machine_modules/leonardo.intel @@ -0,0 +1,15 @@ +module load intel-oneapi-compilers/2023.2.1 +module load netcdf-fortran/4.6.1--intel-oneapi-mpi--2021.12.1--oneapi--2024.1.0 +module load gsl/2.7.1--oneapi--2023.2.0 + +export CC=icx +export NETCDF_CFLAGS=$(nc-config --cflags) +export NETCDF_CLIBS=$(nc-config --libs) +export NETCDF_LIB=$(nc-config --libdir) +export NETCDF_INC=$(nc-config --includedir) + +export FC=ifort +export NETCDF_FFLAGS=$(nf-config --fflags) +export NETCDF_FLIBS=$(nf-config --flibs) +export NETCDFF_LIB=$(nf-config --prefix)/lib +export NETCDFF_INC=$(nf-config --includedir) From a9997e06ad9e29fd49b4bd07f6b3e8137161c2ea Mon Sep 17 00:00:00 2001 From: Paolo Lazzari Date: Mon, 10 Nov 2025 13:37:20 +0100 Subject: [PATCH 03/97] adding include and library paths for FABM --- GeneralCmake.cmake | 4 +++- cmake/FindFABM.cmake | 23 +++++++++++++++++++++++ compilers/x86_64.LINUX.intel.dbg.inc | 4 ++-- compilers/x86_64.LINUX.intel.inc | 4 ++-- 4 files changed, 30 insertions(+), 5 deletions(-) create mode 100644 cmake/FindFABM.cmake diff --git a/GeneralCmake.cmake b/GeneralCmake.cmake index deefd27d..e9ffae84 100644 --- a/GeneralCmake.cmake +++ b/GeneralCmake.cmake @@ -10,6 +10,7 @@ set (NETCDF_F90 "YES") find_package(MPI REQUIRED) find_package(NetCDF REQUIRED) find_package(BFM REQUIRED) +find_package(FABM REQUIRED) find_package(BIOPTIMOD_3STREAM REQUIRED) find_package(OASIM_ATM) @@ -53,6 +54,7 @@ endif () #include include_directories(${BFM_INCLUDES}) +include_directories(${FABM_INCLUDES}) include_directories(${BIOPTIMOD_3STREAM_INCLUDES}) include_directories(${OASIM_ATM_INCLUDES}) include_directories(${NETCDF_INCLUDES_C}) @@ -68,4 +70,4 @@ endforeach() #building add_library( ogstm_lib ${FORTRAN_SOURCES}) add_executable (ogstm.xx application/ogstm_main_caller.f90) -target_link_libraries( ogstm.xx ogstm_lib ${NETCDFF_LIBRARIES_F90} ${BFM_LIBRARIES} ${BIOPTIMOD_3STREAM_LIBRARIES} ${OASIM_ATM_LIBRARIES} ) +target_link_libraries( ogstm.xx ogstm_lib ${NETCDFF_LIBRARIES_F90} ${BFM_LIBRARIES} ${BIOPTIMOD_3STREAM_LIBRARIES} ${OASIM_ATM_LIBRARIES} ${FABM_LIBRARIES} ) diff --git a/cmake/FindFABM.cmake b/cmake/FindFABM.cmake new file mode 100644 index 00000000..d016bfdf --- /dev/null +++ b/cmake/FindFABM.cmake @@ -0,0 +1,23 @@ +# - Find FABM +# Find FABM package + + + find_library( FABM_LIBRARIES NAMES fabm libfabm HINTS $ENV{FABM_LIBRARY} ) + message(STATUS "FABM library = ${FABM_LIBRARIES} ") + if (NOT "$ENV{FABM_LIBRARY}" STREQUAL "") + set(EnvironmentVariableName "$ENV{FABM_LIBRARY}" CACHE INTERNAL "Copied from environment variable") +endif() + +message("EnvironmentVariableName = ${EnvironmentVariableName}") + if (FABM_LIBRARIES) + find_path (FABM_INCLUDES NAMES fabm.h HINTS $ENV{FABM_INCLUDE} NO_DEFAULT_PATH) + add_definitions(-Dkey_trc_fabm -Dkey_INCLUDE_FABM_PELCO2) + message(STATUS "FABM include = ${FABM_INCLUDES} ") + set (FABM_has_interfaces "YES") + else (FABM_LIBRARIES) + set (FABM_has_interfaces "NO") + endif (FABM_LIBRARIES) + +include (FindPackageHandleStandardArgs) +find_package_handle_standard_args (FABM DEFAULT_MSG FABM_has_interfaces) +mark_as_advanced (FABM_LIBRARIES FABM_INCLUDES) diff --git a/compilers/x86_64.LINUX.intel.dbg.inc b/compilers/x86_64.LINUX.intel.dbg.inc index 8c9b76a1..9bbe4b17 100644 --- a/compilers/x86_64.LINUX.intel.dbg.inc +++ b/compilers/x86_64.LINUX.intel.dbg.inc @@ -7,8 +7,8 @@ MPILIB= -L $(MPI_LIB)/lib -lmpi_f90 # F Flags FFLAGS_DBG= -O0 -g -traceback -fp-stack-check -check bounds -fpe0 - FFLAGS= $(FFLAGS_DBG) -I$(NETCDF_INC) -I$(OPENMPI_HOME)/include -I$(BFM_INC) -extend_source - LDFLAGS= -L $(NETCDF_LIB) -lnetcdff -lnetcdf -L$(BFM_LIB) -lbfm + FFLAGS= $(FFLAGS_DBG) -I$(NETCDF_INC) -I$(OPENMPI_HOME)/include -I$(BFM_INC) -I$(FABM_INC) -extend_source + LDFLAGS= -L $(NETCDF_LIB) -lnetcdff -lnetcdf -L$(BFM_LIB) -lbfm -L$(FABM_LIB) -lfabm # C Flags CFLAGS_DBG= CFLAGS= ${CFLAGS_DBG} -I$(NETCDF_INC) -I$(OPENMPI_HOME)/include diff --git a/compilers/x86_64.LINUX.intel.inc b/compilers/x86_64.LINUX.intel.inc index 2e377de9..e2d2df3f 100644 --- a/compilers/x86_64.LINUX.intel.inc +++ b/compilers/x86_64.LINUX.intel.inc @@ -7,8 +7,8 @@ # F Flags MPILIB= -L $(MPI_LIB)/lib -lmpi_f90 FFLAGS_OPT= -fno-math-errno -unroll=3 -opt-subscript-in-range -align all -cpp -heap-arrays - FFLAGS= $(FFLAGS_OPT) -I$(NETCDF_INC) -I$(OPENMPI_HOME)/include -I$(BFM_INC) -extend_source - LDFLAGS= -L $(NETCDF_LIB) -lnetcdff -lnetcdf -L $(BFM_LIB) -lbfm + FFLAGS= $(FFLAGS_OPT) -I$(NETCDF_INC) -I$(OPENMPI_HOME)/include -I$(BFM_INC) -I$(FABM_INC) -extend_source + LDFLAGS= -L $(NETCDF_LIB) -lnetcdff -lnetcdf -L $(BFM_LIB) -lbfm -L $(FABM_LIB) -lfabm # C Flags CFLAGS_DBG= CFLAGS= ${CFLAGS_DBG} -I$(NETCDF_INC) -I$(OPENMPI_HOME)/include From 527c0d8b1b90bcee59547ba47c82b3c902e57ea2 Mon Sep 17 00:00:00 2001 From: Paolo Lazzari Date: Mon, 10 Nov 2025 13:38:13 +0100 Subject: [PATCH 04/97] first test including fabm module --- src/BIO/trcbio.f90 | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/BIO/trcbio.f90 b/src/BIO/trcbio.f90 index b2af56ba..d1162d61 100644 --- a/src/BIO/trcbio.f90 +++ b/src/BIO/trcbio.f90 @@ -40,6 +40,10 @@ SUBROUTINE trcbio USE BC_mem USE mpi +!!! FABM IMPLEMENTATION + USE fabm + + ! ---------------------------------------------------------------------- ! BEGIN BC_REFACTORING SECTION ! --------------------------------------------------------------------- From ca4c38128dcde9fd796dc0a55f218e181a96b27e Mon Sep 17 00:00:00 2001 From: Paolo Lazzari Date: Tue, 11 Nov 2025 14:33:34 +0100 Subject: [PATCH 05/97] start including initialization phase of fabm in ogstm --- src/General/ogstm.f90 | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/src/General/ogstm.f90 b/src/General/ogstm.f90 index f93cfd74..3385482f 100644 --- a/src/General/ogstm.f90 +++ b/src/General/ogstm.f90 @@ -40,7 +40,12 @@ MODULE OGSTM USE MPI_GATHER_INFO USE dtype_procs_string_module use module_step +#ifdef key_trc_bfm use api_bfm +#endif +#ifdef key_trc_fabm + use fabm +#endif USE TREd_var_MP USE oasim, ONLY: oasim_lib, calc_unit @@ -182,13 +187,18 @@ SUBROUTINE ogstm_initialize() call init_phys -! Initialization of Biogeochemical reactor with 1D approach - call BFM0D_NO_BOXES(jpk,1,1,jpk,1) +! Initiialization of Biogeochemical reactor with 1D approach parallel_rank=myrank +#ifdef key_trc_bfm + call BFM0D_NO_BOXES(jpk,1,1,jpk,1) call Init_bfm() call BFM0D_INIT_IO_CHANNELS() - call Initialize() +#endif + +#ifdef key_trc_fabm + +#endif call init_opt From 7ca4acd0e6b5836fcb0e6a64eda1a49d7c1cc803 Mon Sep 17 00:00:00 2001 From: Paolo Lazzari Date: Tue, 11 Nov 2025 14:43:39 +0100 Subject: [PATCH 06/97] Adding Initialize and fabm.yaml read procedure --- src/General/ogstm.f90 | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/General/ogstm.f90 b/src/General/ogstm.f90 index 3385482f..500e3815 100644 --- a/src/General/ogstm.f90 +++ b/src/General/ogstm.f90 @@ -105,6 +105,11 @@ END SUBROUTINE ogstm_launcher ! ************************************************************* SUBROUTINE ogstm_initialize() +#ifdef key_trc_fabm + class (type_fabm_model), pointer :: model +#endif + + ! local declarations ! ================== IMPLICIT NONE @@ -197,7 +202,7 @@ SUBROUTINE ogstm_initialize() #endif #ifdef key_trc_fabm - + model => fabm_create_model() #endif From 8200b62cafd35a20cad0351fba9d327ba89f3d97 Mon Sep 17 00:00:00 2001 From: Paolo Lazzari Date: Tue, 11 Nov 2025 15:16:01 +0100 Subject: [PATCH 07/97] bug fix --- src/General/ogstm.f90 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/General/ogstm.f90 b/src/General/ogstm.f90 index 500e3815..d78c27a9 100644 --- a/src/General/ogstm.f90 +++ b/src/General/ogstm.f90 @@ -105,14 +105,14 @@ END SUBROUTINE ogstm_launcher ! ************************************************************* SUBROUTINE ogstm_initialize() + IMPLICIT NONE + #ifdef key_trc_fabm class (type_fabm_model), pointer :: model #endif - ! local declarations ! ================== - IMPLICIT NONE ! ********************************************* CHARACTER(LEN=1024) :: YAML_FILE INTEGER N_POINTS From 305746bf78fae715b9ed54dba1fdddfbee5a5c63 Mon Sep 17 00:00:00 2001 From: Paolo Lazzari Date: Thu, 20 Nov 2025 14:11:34 +0100 Subject: [PATCH 08/97] Bug fix, put linking of fabm library in the correct order, to fulfill dependencies --- GeneralCmake.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/GeneralCmake.cmake b/GeneralCmake.cmake index e9ffae84..4a662419 100644 --- a/GeneralCmake.cmake +++ b/GeneralCmake.cmake @@ -70,4 +70,4 @@ endforeach() #building add_library( ogstm_lib ${FORTRAN_SOURCES}) add_executable (ogstm.xx application/ogstm_main_caller.f90) -target_link_libraries( ogstm.xx ogstm_lib ${NETCDFF_LIBRARIES_F90} ${BFM_LIBRARIES} ${BIOPTIMOD_3STREAM_LIBRARIES} ${OASIM_ATM_LIBRARIES} ${FABM_LIBRARIES} ) +target_link_libraries( ogstm.xx ogstm_lib ${NETCDFF_LIBRARIES_F90} ${BFM_LIBRARIES} ${FABM_LIBRARIES} ${BIOPTIMOD_3STREAM_LIBRARIES} ${OASIM_ATM_LIBRARIES} ) From d3c082b854bbb0bf71e623bef28feed3e65ed556 Mon Sep 17 00:00:00 2001 From: Paolo Lazzari Date: Thu, 20 Nov 2025 14:21:34 +0100 Subject: [PATCH 09/97] add configuration file fabm.yaml to the FABM --- testcase/deploy_code.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/testcase/deploy_code.py b/testcase/deploy_code.py index 178a8208..7eab1910 100644 --- a/testcase/deploy_code.py +++ b/testcase/deploy_code.py @@ -31,3 +31,6 @@ def deploy_code(test): # print(" ingv_files_direct_reading = .false.") print(" ingv_lon_shift = 0 ") print(" is_free_surface = .false.") + + fabm_yaml= CODEPATH + "fabm/extern/ogs/fabm_multispectral_2xDetritus.yaml" + os.system("cp -pf " + fabm_yaml + test['Dir'].decode() + "/fabm.yaml") From 59bfdd208bd466259d05dc29452898bb5e2f56f0 Mon Sep 17 00:00:00 2001 From: Paolo Lazzari Date: Tue, 25 Nov 2025 12:01:51 +0100 Subject: [PATCH 10/97] change name of lidata add suffix _ogstm to avoid conflict with fabm --- src/BIO-OPTICS/OPT_mem.f90 | 2 +- src/BIO-OPTICS/{lidata.F90 => lidata_ogstm.F90} | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) rename src/BIO-OPTICS/{lidata.F90 => lidata_ogstm.F90} (97%) diff --git a/src/BIO-OPTICS/OPT_mem.f90 b/src/BIO-OPTICS/OPT_mem.f90 index 6ef3b6af..ae778bfa 100644 --- a/src/BIO-OPTICS/OPT_mem.f90 +++ b/src/BIO-OPTICS/OPT_mem.f90 @@ -207,7 +207,7 @@ subroutine myalloc_OPT() allocate(ea(jpj,jpi,3)) ea =huge(ea(1,1,1)) - call lidata() + call lidata_ogstm() allocate(Edaux(nlt)) allocate(Esaux(nlt)) diff --git a/src/BIO-OPTICS/lidata.F90 b/src/BIO-OPTICS/lidata_ogstm.F90 similarity index 97% rename from src/BIO-OPTICS/lidata.F90 rename to src/BIO-OPTICS/lidata_ogstm.F90 index bbf7d510..3c03f442 100644 --- a/src/BIO-OPTICS/lidata.F90 +++ b/src/BIO-OPTICS/lidata_ogstm.F90 @@ -1,5 +1,4 @@ - subroutine lidata() -! subroutine lidata(lam,aw,bw,ac,bc) + subroutine lidata_ogstm() USE OPT_mem, ONLY: nlt, nchl, lam,aw,bw,ac,ac_ps,bc,bbc,apoc,bpoc,bbpoc,acdom USE myalloc, only: lwp,numout From 27516d55d61f456cc1102f3c3a9cbe725b5350e9 Mon Sep 17 00:00:00 2001 From: Paolo Lazzari Date: Wed, 3 Dec 2025 18:16:50 +0100 Subject: [PATCH 11/97] correct string for FABM path --- testcase/deploy_code.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/testcase/deploy_code.py b/testcase/deploy_code.py index 7eab1910..94dab951 100644 --- a/testcase/deploy_code.py +++ b/testcase/deploy_code.py @@ -32,5 +32,5 @@ def deploy_code(test): print(" ingv_lon_shift = 0 ") print(" is_free_surface = .false.") - fabm_yaml= CODEPATH + "fabm/extern/ogs/fabm_multispectral_2xDetritus.yaml" + fabm_yaml= CODEPATH + "/fabm/extern/ogs/fabm_multispectral_2xDetritus.yaml " os.system("cp -pf " + fabm_yaml + test['Dir'].decode() + "/fabm.yaml") From 7ab2f2304df13dbecab27f59155a0eb55a75b50f Mon Sep 17 00:00:00 2001 From: Paolo Lazzari Date: Wed, 3 Dec 2025 18:56:11 +0100 Subject: [PATCH 12/97] add the range of all bio-optical parameters --- testcase/bcs/abw25_boundaries.dat | 38 ++++ testcase/bcs/abw25_morel.dat | 76 ++++---- testcase/bcs/acbc25b.dat | 270 ++++++++++++++++++-------- testcase/bcs/acbc25b_4PFTs.dat | 86 ++++++++ testcase/bcs/acbc25b_ap_equal_ps.dat | 86 ++++++++ testcase/bcs/acbc25b_carbon.dat | 86 ++++++++ testcase/bcs/acbc25b_chla.dat | 86 ++++++++ testcase/bcs/cdom25b_priorOptim.dat | 40 ++++ testcase/bcs/original_abw25_morel.dat | 38 ++++ testcase/bcs/original_acbc25b.dat | 86 ++++++++ testcase/bcs/original_poc25b.dat | 40 ++++ testcase/bcs/poc25b_priorOptim.dat | 40 ++++ 12 files changed, 849 insertions(+), 123 deletions(-) create mode 100755 testcase/bcs/abw25_boundaries.dat create mode 100755 testcase/bcs/acbc25b_4PFTs.dat create mode 100755 testcase/bcs/acbc25b_ap_equal_ps.dat create mode 100755 testcase/bcs/acbc25b_carbon.dat create mode 100755 testcase/bcs/acbc25b_chla.dat create mode 100755 testcase/bcs/cdom25b_priorOptim.dat create mode 100755 testcase/bcs/original_abw25_morel.dat create mode 100755 testcase/bcs/original_acbc25b.dat create mode 100755 testcase/bcs/original_poc25b.dat create mode 100755 testcase/bcs/poc25b_priorOptim.dat diff --git a/testcase/bcs/abw25_boundaries.dat b/testcase/bcs/abw25_boundaries.dat new file mode 100755 index 00000000..e458efcd --- /dev/null +++ b/testcase/bcs/abw25_boundaries.dat @@ -0,0 +1,38 @@ +Spectral seawater absorption and total scattering coefficients in units of /m. +Derived from Smith and Baker 1981 (200-300 nm), and (730-800 nm), Morel et al 2007 (325-475), +Pope and Fry 1997 (500-720), Circio and Petty 1951 (800nm-2.5um), and Maul 1985 (2.5-4um). +bb is the actual value (/m), computed from non-spectral bb ratio = 0.5 ## with wb boundaries ## +Format i5,f8.1,f8.1,f14.4,f8.4,f9.5 + 250 187.5 312.5 0.6112 0.0567 0.02835 + 325 312.5 337.5 0.0218 0.0162 0.00810 + 350 337.5 362.5 0.0081 0.0117 0.00585 + 375 362.5 387.5 0.0057 0.0089 0.00445 + 400 387.5 412.5 0.0047 0.0069 0.00345 + 425 412.5 437.5 0.0049 0.0054 0.00270 + 450 437.5 462.5 0.0085 0.0043 0.00215 + 475 462.5 487.5 0.0117 0.0034 0.00170 + 500 487.5 512.5 0.0215 0.0029 0.00145 + 525 512.5 537.5 0.0407 0.0023 0.00115 + 550 537.5 562.5 0.0550 0.0019 0.00095 + 575 562.5 587.5 0.0849 0.0016 0.00080 + 600 587.5 612.5 0.1995 0.0014 0.00070 + 625 612.5 637.5 0.2850 0.0012 0.00060 + 650 637.5 662.5 0.3512 0.0009 0.00045 + 675 662.5 687.5 0.4559 0.0007 0.00035 + 700 687.5 712.5 0.6433 0.0007 0.00035 + 725 712.5 750.0 1.4449 0.0006 0.00030 + 775 750.0 800.0 2.3900 0.0004 0.00020 + 850 800.0 900.0 3.7382 0.0002 0.00010 + 950 900.0 1000.0 27.4805 0.0000 0.00000 + 1050 1000.0 1100.0 19.3470 0.0000 0.00000 + 1150 1100.0 1200.0 67.1800 0.0000 0.00000 + 1250 1200.0 1300.0 94.9976 0.0000 0.00000 + 1350 1300.0 1400.0 363.1256 0.0000 0.00000 + 1450 1400.0 1500.0 1118.6070 0.0000 0.00000 + 1550 1500.0 1600.0 944.8757 0.0000 0.00000 + 1650 1600.0 1700.0 519.5995 0.0000 0.00000 + 1750 1700.0 1800.0 646.7179 0.0000 0.00000 + 1900 1800.0 2000.0 3768.5610 0.0000 0.00000 + 2200 2000.0 2400.0 2628.0830 0.0000 0.00000 + 2900 2400.0 3400.0 437623.0000 0.0000 0.00000 + 3700 3400.0 4000.0 1338404.0000 0.0000 0.00000 diff --git a/testcase/bcs/abw25_morel.dat b/testcase/bcs/abw25_morel.dat index 229fe589..edfef2bf 100644 --- a/testcase/bcs/abw25_morel.dat +++ b/testcase/bcs/abw25_morel.dat @@ -1,38 +1,38 @@ -Spectral seawater absorption and total scattering coefficients in -units of /m. Derived from Smith and Baker 1981 (200-300 nm), and -(730-800 nm), Morel et al 2007 (325-475), Pope and Fry 1997 (500-720), -Circio and Petty 1951 (800nm-2.5um), and Maul 1985 (2.5-4um). -Format i5,f15.4,f10.4 - 250 0.6112 0.0567 - 325 0.0218 0.0162 - 350 0.0081 0.0117 - 375 0.0057 0.0089 - 400 0.0047 0.0069 - 425 0.0049 0.0054 - 450 0.0085 0.0043 - 475 0.0117 0.0034 - 500 0.0215 0.0029 - 525 0.0407 0.0023 - 550 0.0550 0.0019 - 575 0.0849 0.0016 - 600 0.1995 0.0014 - 625 0.2850 0.0012 - 650 0.3512 0.0009 - 675 0.4559 0.0007 - 700 0.6433 0.0007 - 725 1.4449 0.0006 - 775 2.3900 0.0004 - 850 3.7382 0.0002 - 950 27.4805 0.0000 - 1050 19.3470 0.0000 - 1150 67.1800 0.0000 - 1250 94.9976 0.0000 - 1350 363.1256 0.0000 - 1450 1118.6070 0.0000 - 1550 944.8757 0.0000 - 1650 519.5995 0.0000 - 1750 646.7179 0.0000 - 1900 3768.5610 0.0000 - 2200 2628.0830 0.0000 - 2900 437623.0000 0.0000 - 3700 1338404.0000 0.0000 +Spectral seawater absorption and total scattering coefficients in units of /m. +Derived from Smith and Baker 1981 (200-300 nm), and (730-800 nm), Morel et al 2007 (325-475), +Pope and Fry 1997 (500-720), Circio and Petty 1951 (800nm-2.5um), and Maul 1985 (2.5-4um). +bb is the actual value (/m), computed from non-spectral bb ratio = 0.5 +Format i5,f15.4,f10.4,f11.5 + 250 0.6112 0.0567 0.02835 + 325 0.0218 0.0162 0.00810 + 350 0.0081 0.0117 0.00585 + 375 0.0057 0.0089 0.00445 + 400 0.0047 0.0069 0.00345 + 425 0.0049 0.0054 0.00270 + 450 0.0085 0.0043 0.00215 + 475 0.0117 0.0034 0.00170 + 500 0.0215 0.0029 0.00145 + 525 0.0407 0.0023 0.00115 + 550 0.0550 0.0019 0.00095 + 575 0.0849 0.0016 0.00080 + 600 0.1995 0.0014 0.00070 + 625 0.2850 0.0012 0.00060 + 650 0.3512 0.0009 0.00045 + 675 0.4559 0.0007 0.00035 + 700 0.6433 0.0007 0.00035 + 725 1.4449 0.0006 0.00030 + 775 2.3900 0.0004 0.00020 + 850 3.7382 0.0002 0.00010 + 950 27.4805 0.0000 0.00000 + 1050 19.3470 0.0000 0.00000 + 1150 67.1800 0.0000 0.00000 + 1250 94.9976 0.0000 0.00000 + 1350 363.1256 0.0000 0.00000 + 1450 1118.6070 0.0000 0.00000 + 1550 944.8757 0.0000 0.00000 + 1650 519.5995 0.0000 0.00000 + 1750 646.7179 0.0000 0.00000 + 1900 3768.5610 0.0000 0.00000 + 2200 2628.0830 0.0000 0.00000 + 2900 437623.0000 0.0000 0.00000 + 3700 1338404.0000 0.0000 0.00000 diff --git a/testcase/bcs/acbc25b.dat b/testcase/bcs/acbc25b.dat index dfc5d426..6950e40b 100644 --- a/testcase/bcs/acbc25b.dat +++ b/testcase/bcs/acbc25b.dat @@ -1,86 +1,186 @@ -Phytoplankton chl-specific absorption and c-specific scattering -Computed in 02_PFTs&constituents_data_files_optimized_carbon.R -# aPS reconstructed (Hickman et al. 2010) from aPH compiled from literature (Álvarez et al. 2022 PiO) (m2 mgChla-1) -# aPH scaled to mean aPH (0.0152/0.0293/0.0443/0.0178) optimized in Álvarez et al. 2023 BGC (m2 mgChla-1) -# bPH from Dutkiewicz et al. 2015 (m2 mgC-1), not scaled. Non-spectral bb ratio (from Dut15 & Gregg17), it multiplies bPH in edeseu.F90 -Format I4,4F10.4 +Phytoplankton chl-specific absorption and c-specific scatter +Computed in 11Cluster_aph_literature2.R +# aPH compiled from literature (Literature_spectra6.xls) (m2 mgChla-1) +# bPH from Dutkiewicz et al 2015 (m2 mgC-1) +# non-spectral bb ratio (-) (from Dut15 & Gregg17), it multiplies bPH in light_spectral.F90 +Format I4,2F10.4, 1F10.5, 1F10.4 Diatoms - 250 0.0016 0.0000 0.0035 0.0020 - 325 0.0075 0.0057 0.0035 0.0020 - 350 0.0142 0.0115 0.0035 0.0020 - 375 0.0210 0.0172 0.0035 0.0020 - 400 0.0270 0.0224 0.0035 0.0020 - 425 0.0316 0.0261 0.0034 0.0020 - 450 0.0300 0.0260 0.0034 0.0020 - 475 0.0238 0.0213 0.0035 0.0020 - 500 0.0191 0.0173 0.0036 0.0020 - 525 0.0127 0.0110 0.0037 0.0020 - 550 0.0081 0.0071 0.0036 0.0020 - 575 0.0057 0.0048 0.0036 0.0020 - 600 0.0054 0.0044 0.0035 0.0020 - 625 0.0068 0.0055 0.0034 0.0020 - 650 0.0083 0.0064 0.0032 0.0020 - 675 0.0154 0.0127 0.0030 0.0020 - 700 0.0037 0.0037 0.0031 0.0020 - 725 0.0014 0.0014 0.0031 0.0020 - 775 0.0002 0.0000 0.0031 0.0020 -Flagellates - 250 0.0028 0.0000 0.0066 0.0071 - 325 0.0130 0.0064 0.0066 0.0071 - 350 0.0248 0.0128 0.0066 0.0071 - 375 0.0365 0.0192 0.0066 0.0071 - 400 0.0502 0.0256 0.0066 0.0071 - 425 0.0626 0.0309 0.0064 0.0071 - 450 0.0595 0.0289 0.0064 0.0071 - 475 0.0508 0.0242 0.0068 0.0071 - 500 0.0358 0.0171 0.0076 0.0071 - 525 0.0190 0.0107 0.0081 0.0071 - 550 0.0118 0.0064 0.0084 0.0071 - 575 0.0110 0.0056 0.0084 0.0071 - 600 0.0119 0.0063 0.0082 0.0071 - 625 0.0143 0.0073 0.0080 0.0071 - 650 0.0182 0.0096 0.0078 0.0071 - 675 0.0294 0.0159 0.0073 0.0071 - 700 0.0063 0.0042 0.0080 0.0071 - 725 0.0017 0.0011 0.0080 0.0071 - 775 0.0006 0.0000 0.0080 0.0071 -Pico - 250 0.0042 0.0000 0.0054 0.0039 - 325 0.0192 0.0067 0.0054 0.0039 - 350 0.0365 0.0135 0.0054 0.0039 - 375 0.0539 0.0202 0.0054 0.0039 - 400 0.0725 0.0271 0.0054 0.0039 - 425 0.1026 0.0338 0.0051 0.0039 - 450 0.1038 0.0265 0.0050 0.0039 - 475 0.0824 0.0158 0.0051 0.0039 - 500 0.0571 0.0136 0.0052 0.0039 - 525 0.0279 0.0130 0.0050 0.0039 - 550 0.0241 0.0131 0.0048 0.0039 - 575 0.0161 0.0090 0.0046 0.0039 - 600 0.0125 0.0064 0.0043 0.0039 - 625 0.0147 0.0075 0.0040 0.0039 - 650 0.0215 0.0099 0.0037 0.0039 - 675 0.0335 0.0178 0.0035 0.0039 - 700 0.0070 0.0050 0.0038 0.0039 - 725 0.0017 0.0011 0.0038 0.0039 - 775 0.0000 0.0000 0.0038 0.0039 -Dino - 250 0.0022 0.0000 0.0007 0.0030 - 325 0.0103 0.0084 0.0007 0.0030 - 350 0.0196 0.0168 0.0007 0.0030 - 375 0.0289 0.0252 0.0007 0.0030 - 400 0.0353 0.0316 0.0007 0.0030 - 425 0.0360 0.0323 0.0007 0.0030 - 450 0.0342 0.0312 0.0007 0.0030 - 475 0.0290 0.0269 0.0007 0.0030 - 500 0.0224 0.0208 0.0007 0.0030 - 525 0.0160 0.0150 0.0008 0.0030 - 550 0.0106 0.0102 0.0008 0.0030 - 575 0.0068 0.0063 0.0009 0.0030 - 600 0.0061 0.0056 0.0009 0.0030 - 625 0.0069 0.0061 0.0009 0.0030 - 650 0.0082 0.0069 0.0009 0.0030 - 675 0.0168 0.0152 0.0009 0.0030 - 700 0.0030 0.0030 0.0010 0.0030 - 725 0.0004 0.0004 0.0010 0.0030 - 775 0.0000 0.0000 0.0010 0.0030 + 250 0.0000 0.0000 0.00352 0.0046 + 325 0.0037 0.0036 0.00352 0.0046 + 350 0.0104 0.0103 0.00352 0.0046 + 375 0.0152 0.0151 0.00352 0.0046 + 400 0.0200 0.0199 0.00352 0.0046 + 425 0.0239 0.0236 0.00336 0.0046 + 450 0.0227 0.0223 0.00336 0.0046 + 475 0.0182 0.0178 0.00354 0.0046 + 500 0.0148 0.0145 0.00362 0.0046 + 525 0.0102 0.0102 0.00368 0.0046 + 550 0.0066 0.0066 0.00364 0.0046 + 575 0.0045 0.0045 0.00359 0.0046 + 600 0.0040 0.0040 0.00351 0.0046 + 625 0.0051 0.0051 0.00341 0.0046 + 650 0.0061 0.0061 0.00323 0.0046 + 675 0.0122 0.0120 0.00299 0.0046 + 700 0.0027 0.0027 0.00309 0.0046 + 725 0.0009 0.0009 0.00309 0.0046 + 775 0.0006 0.0006 0.00309 0.0046 +Prymnesiophyceae + 250 0.0000 0.0000 0.00656 0.0020 + 325 0.0046 0.0045 0.00656 0.0020 + 350 0.0129 0.0127 0.00656 0.0020 + 375 0.0190 0.0186 0.00656 0.0020 + 400 0.0241 0.0236 0.00656 0.0020 + 425 0.0277 0.0268 0.00642 0.0020 + 450 0.0260 0.0247 0.00645 0.0020 + 475 0.0214 0.0199 0.00681 0.0020 + 500 0.0163 0.0154 0.00762 0.0020 + 525 0.0100 0.0099 0.00811 0.0020 + 550 0.0065 0.0065 0.00840 0.0020 + 575 0.0056 0.0056 0.00840 0.0020 + 600 0.0059 0.0059 0.00821 0.0020 + 625 0.0070 0.0070 0.00803 0.0020 + 650 0.0081 0.0081 0.00775 0.0020 + 675 0.0140 0.0139 0.00731 0.0020 + 700 0.0039 0.0039 0.00795 0.0020 + 725 0.0013 0.0013 0.00795 0.0020 + 775 0.0003 0.0003 0.00795 0.0020 +SmallEukaryotes + 250 0.0000 0.0000 0.00544 0.0032 + 325 0.0032 0.0032 0.00544 0.0032 + 350 0.0091 0.0090 0.00544 0.0032 + 375 0.0135 0.0132 0.00544 0.0032 + 400 0.0212 0.0206 0.00544 0.0032 + 425 0.0274 0.0263 0.00507 0.0032 + 450 0.0246 0.0230 0.00505 0.0032 + 475 0.0193 0.0176 0.00507 0.0032 + 500 0.0149 0.0138 0.00518 0.0032 + 525 0.0090 0.0089 0.00505 0.0032 + 550 0.0069 0.0069 0.00481 0.0032 + 575 0.0051 0.0051 0.00460 0.0032 + 600 0.0039 0.0039 0.00429 0.0032 + 625 0.0051 0.0051 0.00397 0.0032 + 650 0.0062 0.0062 0.00367 0.0032 + 675 0.0131 0.0129 0.00346 0.0032 + 700 0.0024 0.0024 0.00379 0.0032 + 725 0.0006 0.0006 0.00379 0.0032 + 775 0.0000 0.0000 0.00379 0.0032 +Dinos + 250 0.0000 0.0000 0.00071 0.0022 + 325 0.0063 0.0063 0.00071 0.0022 + 350 0.0178 0.0178 0.00071 0.0022 + 375 0.0262 0.0262 0.00071 0.0022 + 400 0.0324 0.0324 0.00071 0.0022 + 425 0.0337 0.0337 0.00070 0.0022 + 450 0.0320 0.0320 0.00067 0.0022 + 475 0.0270 0.0270 0.00068 0.0022 + 500 0.0209 0.0209 0.00074 0.0022 + 525 0.0152 0.0152 0.00079 0.0022 + 550 0.0105 0.0105 0.00085 0.0022 + 575 0.0070 0.0070 0.00091 0.0022 + 600 0.0062 0.0062 0.00092 0.0022 + 625 0.0067 0.0067 0.00093 0.0022 + 650 0.0078 0.0078 0.00093 0.0022 + 675 0.0158 0.0156 0.00086 0.0022 + 700 0.0026 0.0026 0.00097 0.0022 + 725 0.0003 0.0003 0.00097 0.0022 + 775 0.0000 0.0000 0.00097 0.0022 +Coccolithophores + 250 0.0000 0.0000 0.00656 0.0071 + 325 0.0075 0.0073 0.00656 0.0071 + 350 0.0214 0.0206 0.00656 0.0071 + 375 0.0314 0.0302 0.00656 0.0071 + 400 0.0370 0.0355 0.00656 0.0071 + 425 0.0370 0.0348 0.00642 0.0071 + 450 0.0373 0.0341 0.00645 0.0071 + 475 0.0331 0.0292 0.00681 0.0071 + 500 0.0223 0.0200 0.00762 0.0071 + 525 0.0138 0.0136 0.00811 0.0071 + 550 0.0075 0.0075 0.00840 0.0071 + 575 0.0061 0.0061 0.00840 0.0071 + 600 0.0063 0.0063 0.00821 0.0071 + 625 0.0067 0.0067 0.00803 0.0071 + 650 0.0074 0.0074 0.00775 0.0071 + 675 0.0153 0.0151 0.00731 0.0071 + 700 0.0022 0.0022 0.00795 0.0071 + 725 0.0004 0.0004 0.00795 0.0071 + 775 0.0006 0.0006 0.00795 0.0071 +Prochlorococcus + 250 0.0000 0.0000 0.00544 0.0062 + 325 0.0085 0.0059 0.00544 0.0062 + 350 0.0241 0.0167 0.00544 0.0062 + 375 0.0355 0.0245 0.00544 0.0062 + 400 0.0454 0.0304 0.00544 0.0062 + 425 0.0649 0.0384 0.00507 0.0062 + 450 0.0708 0.0274 0.00505 0.0062 + 475 0.0551 0.0157 0.00507 0.0062 + 500 0.0325 0.0072 0.00518 0.0062 + 525 0.0094 0.0063 0.00505 0.0062 + 550 0.0054 0.0052 0.00481 0.0062 + 575 0.0055 0.0055 0.00460 0.0062 + 600 0.0069 0.0069 0.00429 0.0062 + 625 0.0079 0.0079 0.00397 0.0062 + 650 0.0138 0.0138 0.00367 0.0062 + 675 0.0194 0.0192 0.00346 0.0062 + 700 0.0034 0.0034 0.00379 0.0062 + 725 0.0009 0.0009 0.00379 0.0062 + 775 0.0000 0.0000 0.00379 0.0062 +Chlorophyceae + 250 0.0000 0.0000 0.00656 0.0054 + 325 0.0036 0.0035 0.00656 0.0054 + 350 0.0101 0.0099 0.00656 0.0054 + 375 0.0149 0.0145 0.00656 0.0054 + 400 0.0211 0.0203 0.00656 0.0054 + 425 0.0269 0.0255 0.00642 0.0054 + 450 0.0250 0.0227 0.00645 0.0054 + 475 0.0224 0.0202 0.00681 0.0054 + 500 0.0163 0.0147 0.00762 0.0054 + 525 0.0076 0.0075 0.00811 0.0054 + 550 0.0056 0.0056 0.00840 0.0054 + 575 0.0064 0.0064 0.00840 0.0054 + 600 0.0074 0.0074 0.00821 0.0054 + 625 0.0087 0.0087 0.00803 0.0054 + 650 0.0116 0.0116 0.00775 0.0054 + 675 0.0158 0.0157 0.00731 0.0054 + 700 0.0044 0.0044 0.00795 0.0054 + 725 0.0015 0.0015 0.00795 0.0054 + 775 0.0011 0.0011 0.00795 0.0054 +EuPrasinophyceae + 250 0.0000 0.0000 0.00656 0.0062 + 325 0.0046 0.0039 0.00656 0.0062 + 350 0.0129 0.0110 0.00656 0.0062 + 375 0.0190 0.0161 0.00656 0.0062 + 400 0.0288 0.0237 0.00656 0.0062 + 425 0.0409 0.0317 0.00642 0.0062 + 450 0.0397 0.0256 0.00645 0.0062 + 475 0.0363 0.0220 0.00681 0.0062 + 500 0.0221 0.0126 0.00762 0.0062 + 525 0.0089 0.0080 0.00811 0.0062 + 550 0.0045 0.0045 0.00840 0.0062 + 575 0.0047 0.0047 0.00840 0.0062 + 600 0.0058 0.0058 0.00821 0.0062 + 625 0.0074 0.0074 0.00803 0.0062 + 650 0.0130 0.0130 0.00775 0.0062 + 675 0.0172 0.0170 0.00731 0.0062 + 700 0.0027 0.0027 0.00795 0.0062 + 725 0.0000 0.0000 0.00795 0.0062 + 775 0.0000 0.0000 0.00795 0.0062 +Synecococcus + 250 0.0000 0.0000 0.00544 0.0062 + 325 0.0080 0.0062 0.00544 0.0062 + 350 0.0226 0.0176 0.00544 0.0062 + 375 0.0332 0.0259 0.00544 0.0062 + 400 0.0442 0.0336 0.00544 0.0062 + 425 0.0573 0.0389 0.00507 0.0062 + 450 0.0509 0.0218 0.00505 0.0062 + 475 0.0420 0.0132 0.00507 0.0062 + 500 0.0371 0.0196 0.00518 0.0062 + 525 0.0269 0.0250 0.00505 0.0062 + 550 0.0269 0.0268 0.00481 0.0062 + 575 0.0152 0.0152 0.00460 0.0062 + 600 0.0083 0.0083 0.00429 0.0062 + 625 0.0100 0.0100 0.00397 0.0062 + 650 0.0115 0.0115 0.00367 0.0062 + 675 0.0210 0.0207 0.00346 0.0062 + 700 0.0053 0.0053 0.00379 0.0062 + 725 0.0012 0.0012 0.00379 0.0062 + 775 0.0000 0.0000 0.00379 0.0062 diff --git a/testcase/bcs/acbc25b_4PFTs.dat b/testcase/bcs/acbc25b_4PFTs.dat new file mode 100755 index 00000000..14116f83 --- /dev/null +++ b/testcase/bcs/acbc25b_4PFTs.dat @@ -0,0 +1,86 @@ +Phytoplankton chl-specific absorption and scatter +Computed in 14Ap_Apps_phyto_BFM_chla.R (with aPS reconstructed) +# aPH compiled from literature (Literature_spectra6.xls) (m2 mgChla-1) +# bPH from Dutkiewicz et al 2015 (m2 mgC-1) +# non-spectral bb ratio (-) (from Dut15 & Gregg17), it multiplies bPH in light_spectral.F90 +Format I4,2F10.4, 1F10.5, 1F10.4 +Diatoms + 250 0.0000 0.0000 0.00352 0.0020 + 325 0.0057 0.0057 0.00352 0.0020 + 350 0.0115 0.0115 0.00352 0.0020 + 375 0.0172 0.0172 0.00352 0.0020 + 400 0.0224 0.0224 0.00352 0.0020 + 425 0.0261 0.0261 0.00336 0.0020 + 450 0.0260 0.0260 0.00336 0.0020 + 475 0.0213 0.0213 0.00354 0.0020 + 500 0.0173 0.0173 0.00362 0.0020 + 525 0.0110 0.0110 0.00368 0.0020 + 550 0.0071 0.0071 0.00364 0.0020 + 575 0.0048 0.0048 0.00359 0.0020 + 600 0.0044 0.0044 0.00351 0.0020 + 625 0.0055 0.0055 0.00341 0.0020 + 650 0.0064 0.0064 0.00323 0.0020 + 675 0.0127 0.0127 0.00299 0.0020 + 700 0.0039 0.0039 0.00309 0.0020 + 725 0.0014 0.0014 0.00309 0.0020 + 775 0.0000 0.0000 0.00309 0.0020 +Flagellates + 250 0.0000 0.0000 0.00656 0.0071 + 325 0.0067 0.0064 0.00656 0.0071 + 350 0.0134 0.0128 0.00656 0.0071 + 375 0.0201 0.0192 0.00656 0.0071 + 400 0.0275 0.0256 0.00656 0.0071 + 425 0.0350 0.0309 0.00642 0.0071 + 450 0.0350 0.0289 0.00645 0.0071 + 475 0.0308 0.0242 0.00681 0.0071 + 500 0.0216 0.0171 0.00762 0.0071 + 525 0.0114 0.0107 0.00811 0.0071 + 550 0.0064 0.0064 0.00840 0.0071 + 575 0.0056 0.0056 0.00840 0.0071 + 600 0.0063 0.0063 0.00821 0.0071 + 625 0.0073 0.0073 0.00803 0.0071 + 650 0.0096 0.0096 0.00775 0.0071 + 675 0.0161 0.0159 0.00731 0.0071 + 700 0.0040 0.0042 0.00795 0.0071 + 725 0.0008 0.0011 0.00795 0.0071 + 775 0.0003 0.0000 0.00795 0.0071 +Pico + 250 0.0000 0.0000 0.00544 0.0039 + 325 0.0105 0.0067 0.00544 0.0039 + 350 0.0178 0.0135 0.00544 0.0039 + 375 0.0252 0.0202 0.00544 0.0039 + 400 0.0353 0.0271 0.00544 0.0039 + 425 0.0485 0.0338 0.00507 0.0039 + 450 0.0497 0.0265 0.00505 0.0039 + 475 0.0394 0.0158 0.00507 0.0039 + 500 0.0299 0.0136 0.00518 0.0039 + 525 0.0157 0.0130 0.00505 0.0039 + 550 0.0133 0.0131 0.00481 0.0039 + 575 0.0090 0.0090 0.00460 0.0039 + 600 0.0063 0.0064 0.00429 0.0039 + 625 0.0075 0.0075 0.00397 0.0039 + 650 0.0099 0.0099 0.00367 0.0039 + 675 0.0179 0.0178 0.00346 0.0039 + 700 0.0050 0.0050 0.00379 0.0039 + 725 0.0010 0.0011 0.00379 0.0039 + 775 0.0000 0.0000 0.00379 0.0039 +Dino + 250 0.0000 0.0000 0.00071 0.0030 + 325 0.0084 0.0084 0.00071 0.0030 + 350 0.0168 0.0168 0.00071 0.0030 + 375 0.0252 0.0252 0.00071 0.0030 + 400 0.0316 0.0316 0.00071 0.0030 + 425 0.0323 0.0323 0.00070 0.0030 + 450 0.0312 0.0312 0.00067 0.0030 + 475 0.0269 0.0269 0.00068 0.0030 + 500 0.0208 0.0208 0.00074 0.0030 + 525 0.0150 0.0150 0.00079 0.0030 + 550 0.0102 0.0102 0.00085 0.0030 + 575 0.0063 0.0063 0.00091 0.0030 + 600 0.0056 0.0056 0.00092 0.0030 + 625 0.0061 0.0061 0.00093 0.0030 + 650 0.0069 0.0069 0.00093 0.0030 + 675 0.0152 0.0152 0.00086 0.0030 + 700 0.0037 0.0037 0.00097 0.0030 + 725 0.0005 0.0005 0.00097 0.0030 + 775 0.0000 0.0000 0.00097 0.0030 diff --git a/testcase/bcs/acbc25b_ap_equal_ps.dat b/testcase/bcs/acbc25b_ap_equal_ps.dat new file mode 100755 index 00000000..2bebc07a --- /dev/null +++ b/testcase/bcs/acbc25b_ap_equal_ps.dat @@ -0,0 +1,86 @@ +Phytoplankton chl-specific absorption and scatter +Computed in 13PFTs_&constituents_data_files_4columns.R +# aPH compiled from literature (Literature_spectra5.xls) (m2 mgChla-1) +# bPH compiled from literature (Literature_spectra5.xls) (m2 mgChla-1) +# non-spectral bb ratio (-), it multiplies bPH in light_spectral.F90 +Format I4,4F10.4 +Diatoms + 250 0.0013 0.0013 0.2705 0.0109 + 325 0.0062 0.0062 0.2705 0.0109 + 350 0.0117 0.0117 0.2705 0.0109 + 375 0.0173 0.0173 0.2705 0.0109 + 400 0.0223 0.0223 0.2705 0.0109 + 425 0.0261 0.0261 0.2574 0.0109 + 450 0.0248 0.0248 0.2489 0.0109 + 475 0.0196 0.0196 0.2509 0.0109 + 500 0.0158 0.0158 0.2524 0.0109 + 525 0.0105 0.0105 0.2545 0.0109 + 550 0.0067 0.0067 0.2536 0.0109 + 575 0.0047 0.0047 0.2491 0.0109 + 600 0.0044 0.0044 0.2410 0.0109 + 625 0.0056 0.0056 0.2305 0.0109 + 650 0.0068 0.0068 0.2174 0.0109 + 675 0.0127 0.0127 0.1984 0.0109 + 700 0.0030 0.0030 0.2074 0.0109 + 725 0.0012 0.0012 0.2033 0.0109 + 775 0.0002 0.0002 0.2033 0.0109 +Flagellates + 250 0.0014 0.0014 0.1118 0.0048 + 325 0.0067 0.0067 0.1118 0.0048 + 350 0.0127 0.0127 0.1118 0.0048 + 375 0.0187 0.0187 0.1118 0.0048 + 400 0.0257 0.0257 0.1118 0.0048 + 425 0.0321 0.0321 0.1090 0.0048 + 450 0.0305 0.0305 0.1116 0.0048 + 475 0.0261 0.0261 0.1184 0.0048 + 500 0.0184 0.0184 0.1294 0.0048 + 525 0.0098 0.0098 0.1414 0.0048 + 550 0.0060 0.0060 0.1445 0.0048 + 575 0.0056 0.0056 0.1451 0.0048 + 600 0.0061 0.0061 0.1440 0.0048 + 625 0.0073 0.0073 0.1410 0.0048 + 650 0.0094 0.0094 0.1352 0.0048 + 675 0.0151 0.0151 0.1253 0.0048 + 700 0.0032 0.0032 0.1375 0.0048 + 725 0.0009 0.0009 0.1394 0.0048 + 775 0.0003 0.0003 0.1394 0.0048 +Pico + 250 0.0025 0.0025 0.1921 0.0026 + 325 0.0115 0.0115 0.1921 0.0026 + 350 0.0219 0.0219 0.1921 0.0026 + 375 0.0322 0.0322 0.1921 0.0026 + 400 0.0434 0.0434 0.1921 0.0026 + 425 0.0614 0.0614 0.1816 0.0026 + 450 0.0621 0.0621 0.1758 0.0026 + 475 0.0493 0.0493 0.1632 0.0026 + 500 0.0342 0.0342 0.1522 0.0026 + 525 0.0167 0.0167 0.1394 0.0026 + 550 0.0144 0.0144 0.1280 0.0026 + 575 0.0096 0.0096 0.1223 0.0026 + 600 0.0075 0.0075 0.1119 0.0026 + 625 0.0088 0.0088 0.0998 0.0026 + 650 0.0129 0.0129 0.0904 0.0026 + 675 0.0201 0.0201 0.0838 0.0026 + 700 0.0042 0.0042 0.0863 0.0026 + 725 0.0010 0.0010 0.0797 0.0026 + 775 0.0000 0.0000 0.0797 0.0026 +Dino + 250 0.0020 0.0020 0.0311 0.0023 + 325 0.0093 0.0093 0.0311 0.0023 + 350 0.0177 0.0177 0.0311 0.0023 + 375 0.0261 0.0261 0.0311 0.0023 + 400 0.0318 0.0318 0.0311 0.0023 + 425 0.0325 0.0325 0.0303 0.0023 + 450 0.0309 0.0309 0.0294 0.0023 + 475 0.0262 0.0262 0.0294 0.0023 + 500 0.0202 0.0202 0.0324 0.0023 + 525 0.0144 0.0144 0.0344 0.0023 + 550 0.0096 0.0096 0.0369 0.0023 + 575 0.0061 0.0061 0.0397 0.0023 + 600 0.0055 0.0055 0.0398 0.0023 + 625 0.0062 0.0062 0.0403 0.0023 + 650 0.0074 0.0074 0.0404 0.0023 + 675 0.0151 0.0151 0.0379 0.0023 + 700 0.0027 0.0027 0.0416 0.0023 + 725 0.0004 0.0004 0.0443 0.0023 + 775 0.0000 0.0000 0.0443 0.0023 diff --git a/testcase/bcs/acbc25b_carbon.dat b/testcase/bcs/acbc25b_carbon.dat new file mode 100755 index 00000000..2eaadbe9 --- /dev/null +++ b/testcase/bcs/acbc25b_carbon.dat @@ -0,0 +1,86 @@ +Phytoplankton chl-specific absorption and c-specific scatter +Computed in 02PFTs_&constituents_data_files_carbon.R +# aPH compiled from literature (Literature_spectra6.xls) (m2 mgChla-1) and scaled +# bPH from Dutkiewicz et al 2015 (m2 mgC-1) +# non-spectral bb ratio (-), it multiplies bPH in edeseu.F90 +Format I4,2F10.4, 1F10.5, 1F13.9 +Diatoms + 250 0.0014 0.0014 0.00352 0.000068182 + 325 0.0063 0.0063 0.00352 0.000068182 + 350 0.0120 0.0120 0.00352 0.000068182 + 375 0.0177 0.0177 0.00352 0.000068182 + 400 0.0227 0.0227 0.00352 0.000068182 + 425 0.0266 0.0266 0.00336 0.000071428 + 450 0.0253 0.0253 0.00336 0.000071428 + 475 0.0200 0.0200 0.00354 0.000067796 + 500 0.0161 0.0161 0.00362 0.000066298 + 525 0.0107 0.0107 0.00368 0.000065217 + 550 0.0068 0.0068 0.00364 0.000065934 + 575 0.0048 0.0048 0.00359 0.000066852 + 600 0.0045 0.0045 0.00351 0.000068376 + 625 0.0058 0.0058 0.00341 0.000070381 + 650 0.0069 0.0069 0.00323 0.000074303 + 675 0.0130 0.0130 0.00299 0.000080267 + 700 0.0031 0.0031 0.00309 0.000077670 + 725 0.0012 0.0012 0.00309 0.000077670 + 775 0.0002 0.0002 0.00309 0.000077670 +Flagellates + 250 0.0027 0.0027 0.00656 0.000383537 + 325 0.0124 0.0124 0.00656 0.000383537 + 350 0.0236 0.0236 0.00656 0.000383537 + 375 0.0348 0.0348 0.00656 0.000383537 + 400 0.0478 0.0478 0.00656 0.000383537 + 425 0.0596 0.0596 0.00642 0.000391900 + 450 0.0567 0.0567 0.00645 0.000390077 + 475 0.0484 0.0484 0.00681 0.000369457 + 500 0.0341 0.0341 0.00762 0.000330184 + 525 0.0181 0.0181 0.00811 0.000310234 + 550 0.0112 0.0112 0.00840 0.000299524 + 575 0.0104 0.0104 0.00840 0.000299524 + 600 0.0113 0.0113 0.00821 0.000306455 + 625 0.0136 0.0136 0.00803 0.000313325 + 650 0.0174 0.0174 0.00775 0.000324645 + 675 0.0280 0.0280 0.00731 0.000344186 + 700 0.0060 0.0060 0.00795 0.000316478 + 725 0.0016 0.0016 0.00795 0.000316478 + 775 0.0006 0.0006 0.00795 0.000316478 +Pico + 250 0.0030 0.0030 0.00544 0.002125287 + 325 0.0139 0.0139 0.00544 0.002125287 + 350 0.0264 0.0264 0.00544 0.002125287 + 375 0.0389 0.0389 0.00544 0.002125287 + 400 0.0524 0.0524 0.00544 0.002125287 + 425 0.0741 0.0741 0.00507 0.002279339 + 450 0.0750 0.0750 0.00505 0.002289500 + 475 0.0595 0.0595 0.00507 0.002278216 + 500 0.0413 0.0413 0.00518 0.002233092 + 525 0.0202 0.0202 0.00505 0.002288366 + 550 0.0174 0.0174 0.00481 0.002402547 + 575 0.0116 0.0116 0.00460 0.002514962 + 600 0.0090 0.0090 0.00429 0.002693765 + 625 0.0106 0.0106 0.00397 0.002907233 + 650 0.0156 0.0156 0.00367 0.003144558 + 675 0.0242 0.0242 0.00346 0.003339957 + 700 0.0051 0.0051 0.00379 0.003053170 + 725 0.0012 0.0012 0.00379 0.003053170 + 775 0.0000 0.0000 0.00379 0.003053170 +Dino + 250 0.0028 0.0028 0.00071 0.002443662 + 325 0.0128 0.0128 0.00071 0.002443662 + 350 0.0243 0.0243 0.00071 0.002443662 + 375 0.0358 0.0358 0.00071 0.002443662 + 400 0.0436 0.0436 0.00071 0.002443662 + 425 0.0445 0.0445 0.00070 0.002478571 + 450 0.0423 0.0423 0.00067 0.002589552 + 475 0.0359 0.0359 0.00068 0.002551471 + 500 0.0277 0.0277 0.00074 0.002344595 + 525 0.0198 0.0198 0.00079 0.002196203 + 550 0.0131 0.0131 0.00085 0.002041176 + 575 0.0084 0.0084 0.00091 0.001906593 + 600 0.0075 0.0075 0.00092 0.001885870 + 625 0.0085 0.0085 0.00093 0.001865591 + 650 0.0101 0.0101 0.00093 0.001865591 + 675 0.0208 0.0208 0.00086 0.002017442 + 700 0.0037 0.0037 0.00097 0.001788660 + 725 0.0005 0.0005 0.00097 0.001788660 + 775 0.0000 0.0000 0.00097 0.001788660 diff --git a/testcase/bcs/acbc25b_chla.dat b/testcase/bcs/acbc25b_chla.dat new file mode 100755 index 00000000..915f5560 --- /dev/null +++ b/testcase/bcs/acbc25b_chla.dat @@ -0,0 +1,86 @@ +Phytoplankton chl-specific absorption and scatter +Computed in 14Ap_Apps_phyto_BFM_chla.R (with aPS reconstructed) +# aPH compiled from literature (Literature_spectra6.xls) (m2 mgChla-1) +# bPH compiled from literature (Literature_spectra6.xls) (m2 mgChla-1) +# non-spectral bb ratio (-), it multiplies bPH in light_spectral.F90 +Format I4,4F10.4 +Diatoms + 250 0.0000 0.0000 0.2705 0.0047 + 325 0.0057 0.0057 0.2705 0.0047 + 350 0.0115 0.0115 0.2705 0.0047 + 375 0.0172 0.0172 0.2705 0.0047 + 400 0.0224 0.0224 0.2705 0.0047 + 425 0.0261 0.0261 0.2600 0.0047 + 450 0.0260 0.0260 0.2491 0.0047 + 475 0.0213 0.0213 0.2508 0.0047 + 500 0.0173 0.0173 0.2522 0.0047 + 525 0.0110 0.0110 0.2545 0.0047 + 550 0.0071 0.0071 0.2534 0.0047 + 575 0.0048 0.0048 0.2498 0.0047 + 600 0.0044 0.0044 0.2405 0.0047 + 625 0.0055 0.0055 0.2304 0.0047 + 650 0.0064 0.0064 0.2174 0.0047 + 675 0.0127 0.0127 0.2013 0.0047 + 700 0.0039 0.0039 0.2065 0.0047 + 725 0.0014 0.0014 0.2033 0.0047 + 775 0.0000 0.0000 0.2033 0.0047 +Flagellates + 250 0.0000 0.0000 0.0318 0.0038 + 325 0.0067 0.0064 0.0318 0.0038 + 350 0.0134 0.0128 0.0318 0.0038 + 375 0.0201 0.0192 0.0318 0.0038 + 400 0.0275 0.0256 0.0318 0.0038 + 425 0.0350 0.0309 0.0305 0.0038 + 450 0.0350 0.0289 0.0325 0.0038 + 475 0.0308 0.0242 0.0348 0.0038 + 500 0.0216 0.0171 0.0393 0.0038 + 525 0.0114 0.0107 0.0461 0.0038 + 550 0.0064 0.0064 0.0472 0.0038 + 575 0.0056 0.0056 0.0480 0.0038 + 600 0.0063 0.0063 0.0476 0.0038 + 625 0.0073 0.0073 0.0470 0.0038 + 650 0.0096 0.0096 0.0444 0.0038 + 675 0.0161 0.0159 0.0404 0.0038 + 700 0.0040 0.0042 0.0478 0.0038 + 725 0.0008 0.0011 0.0511 0.0038 + 775 0.0003 0.0000 0.0511 0.0038 +Pico + 250 0.0000 0.0000 0.1857 0.0036 + 325 0.0105 0.0067 0.1857 0.0036 + 350 0.0178 0.0135 0.1857 0.0036 + 375 0.0252 0.0202 0.1857 0.0036 + 400 0.0353 0.0271 0.1857 0.0036 + 425 0.0485 0.0338 0.1786 0.0036 + 450 0.0497 0.0265 0.1741 0.0036 + 475 0.0394 0.0158 0.1677 0.0036 + 500 0.0299 0.0136 0.1625 0.0036 + 525 0.0157 0.0130 0.1575 0.0036 + 550 0.0133 0.0131 0.1496 0.0036 + 575 0.0090 0.0090 0.1454 0.0036 + 600 0.0063 0.0064 0.1379 0.0036 + 625 0.0075 0.0075 0.1283 0.0036 + 650 0.0099 0.0099 0.1204 0.0036 + 675 0.0179 0.0178 0.1128 0.0036 + 700 0.0050 0.0050 0.1163 0.0036 + 725 0.0010 0.0011 0.1126 0.0036 + 775 0.0000 0.0000 0.1126 0.0036 +Dino + 250 0.0000 0.0000 0.0311 0.0022 + 325 0.0084 0.0084 0.0311 0.0022 + 350 0.0168 0.0168 0.0311 0.0022 + 375 0.0252 0.0252 0.0311 0.0022 + 400 0.0316 0.0316 0.0311 0.0022 + 425 0.0323 0.0323 0.0305 0.0022 + 450 0.0312 0.0312 0.0294 0.0022 + 475 0.0269 0.0269 0.0297 0.0022 + 500 0.0208 0.0208 0.0325 0.0022 + 525 0.0150 0.0150 0.0344 0.0022 + 550 0.0102 0.0102 0.0370 0.0022 + 575 0.0063 0.0063 0.0396 0.0022 + 600 0.0056 0.0056 0.0399 0.0022 + 625 0.0061 0.0061 0.0403 0.0022 + 650 0.0069 0.0069 0.0403 0.0022 + 675 0.0152 0.0152 0.0385 0.0022 + 700 0.0037 0.0037 0.0425 0.0022 + 725 0.0005 0.0005 0.0443 0.0022 + 775 0.0000 0.0000 0.0443 0.0022 diff --git a/testcase/bcs/cdom25b_priorOptim.dat b/testcase/bcs/cdom25b_priorOptim.dat new file mode 100755 index 00000000..7fb2a595 --- /dev/null +++ b/testcase/bcs/cdom25b_priorOptim.dat @@ -0,0 +1,40 @@ +CDOM c-specific absorption +Computed in 13PFTs_&constituents_data_files_4columns.R +# S_250_650 = 0.017 nm-1 +# a_cdom at 450nm = 0.015 m2 mgC-1 +# average of the integral in the waveband +Format I5,1E10.2 + 250 5.389319e-01 + 325 1.265408e-01 + 350 8.272856e-02 + 375 5.408544e-02 + 400 3.535942e-02 + 425 2.311692e-02 + 450 1.511315e-02 + 475 9.880518e-03 + 500 6.459584e-03 + 525 4.223081e-03 + 550 2.760923e-03 + 575 1.805008e-03 + 600 1.180060e-03 + 625 7.714873e-04 + 650 5.043751e-04 + 675 3.297452e-04 + 700 2.155774e-04 + 725 1.279235e-04 + 775 6.160422e-05 + 850 1.879232e-05 + 950 3.433047e-06 + 1050 6.271612e-07 + 1150 1.145720e-07 + 1250 2.093042e-08 + 1350 3.823643e-09 + 1450 6.985166e-10 + 1550 1.276075e-10 + 1650 2.331178e-11 + 1750 4.258678e-12 + 1900 4.600582e-13 + 2200 7.933024e-15 + 2900 3.538183e-18 + 3700 2.441219e-25 + 4000 0.000000e-00 diff --git a/testcase/bcs/original_abw25_morel.dat b/testcase/bcs/original_abw25_morel.dat new file mode 100755 index 00000000..229fe589 --- /dev/null +++ b/testcase/bcs/original_abw25_morel.dat @@ -0,0 +1,38 @@ +Spectral seawater absorption and total scattering coefficients in +units of /m. Derived from Smith and Baker 1981 (200-300 nm), and +(730-800 nm), Morel et al 2007 (325-475), Pope and Fry 1997 (500-720), +Circio and Petty 1951 (800nm-2.5um), and Maul 1985 (2.5-4um). +Format i5,f15.4,f10.4 + 250 0.6112 0.0567 + 325 0.0218 0.0162 + 350 0.0081 0.0117 + 375 0.0057 0.0089 + 400 0.0047 0.0069 + 425 0.0049 0.0054 + 450 0.0085 0.0043 + 475 0.0117 0.0034 + 500 0.0215 0.0029 + 525 0.0407 0.0023 + 550 0.0550 0.0019 + 575 0.0849 0.0016 + 600 0.1995 0.0014 + 625 0.2850 0.0012 + 650 0.3512 0.0009 + 675 0.4559 0.0007 + 700 0.6433 0.0007 + 725 1.4449 0.0006 + 775 2.3900 0.0004 + 850 3.7382 0.0002 + 950 27.4805 0.0000 + 1050 19.3470 0.0000 + 1150 67.1800 0.0000 + 1250 94.9976 0.0000 + 1350 363.1256 0.0000 + 1450 1118.6070 0.0000 + 1550 944.8757 0.0000 + 1650 519.5995 0.0000 + 1750 646.7179 0.0000 + 1900 3768.5610 0.0000 + 2200 2628.0830 0.0000 + 2900 437623.0000 0.0000 + 3700 1338404.0000 0.0000 diff --git a/testcase/bcs/original_acbc25b.dat b/testcase/bcs/original_acbc25b.dat new file mode 100755 index 00000000..5ceeafa6 --- /dev/null +++ b/testcase/bcs/original_acbc25b.dat @@ -0,0 +1,86 @@ + Phytoplankton group chlorophyll-specific + absorption and total scattering coefficients. + Diatoms, Chlorophytes, Cyanobacteria + Coccolithphores, and Dinoflagellates, grouped as + ac, bc within each heading + Format: i4,2f10.4 + Diatoms + 250 0. 0.3972 + 325 0. 0.3655 + 350 0.0309 0.3208 + 375 0.032 0.312 + 400 0.034 0.2992 + 425 0.0384 0.2841 + 450 0.0379 0.2738 + 475 0.0324 0.2686 + 500 0.0272 0.2631 + 525 0.0206 0.2589 + 550 0.014 0.2547 + 575 0.0087 0.2494 + 600 0.0071 0.2402 + 625 0.0091 0.2275 + 650 0.0104 0.2154 + 675 0.0223 0.1927 + 700 0.0042 0.2001 + 725 0.0003 0.1932 + 750 0. 0. + Flagellates + 250 0. 0.8391 + 325 0. 0.7732 + 350 0.0563 0.6882 + 375 0.0572 0.6712 + 400 0.0645 0.6416 + 425 0.0721 0.6115 + 450 0.0709 0.5904 + 475 0.0596 0.5793 + 500 0.0412 0.5753 + 525 0.0229 0.5713 + 550 0.0123 0.5595 + 575 0.0085 0.5409 + 600 0.0082 0.5189 + 625 0.0081 0.4965 + 650 0.0083 0.474 + 675 0.018 0.442 + 700 0.0049 0.4326 + 725 0.0008 0.4144 + 750 0. 0. + Pico + 250 0. 0.3146 + 325 0. 0.2851 + 350 0.0427 0.2296 + 375 0.0444 0.2207 + 400 0.0478 0.2073 + 425 0.0554 0.1897 + 450 0.0523 0.1828 + 475 0.0414 0.1837 + 500 0.0359 0.1792 + 525 0.0266 0.1785 + 550 0.0256 0.1695 + 575 0.0257 0.1594 + 600 0.0181 0.1570 + 625 0.01901 0.146 + 650 0.0197 0.1354 + 675 0.0262 0.1188 + 700 0.0129 0.1223 + 725 0.0068 0.1183 + 750 0. 0. + Dino + 250 0. 0.0462 + 325 0. 0.0462 + 350 0.0269 0.0193 + 375 0.028 0.0182 + 400 0.0299 0.0164 + 425 0.0337 0.0125 + 450 0.0345 0.0117 + 475 0.0316 0.0146 + 500 0.027 0.0192 + 525 0.0211 0.0251 + 550 0.0167 0.0295 + 575 0.0102 0.036 + 600 0.009 0.0372 + 625 0.0089 0.0373 + 650 0.0093 0.0369 + 675 0.0185 0.0277 + 700 0.0065 0.0397 + 725 0.0003 0.0459 + 750 0. 0. diff --git a/testcase/bcs/original_poc25b.dat b/testcase/bcs/original_poc25b.dat new file mode 100755 index 00000000..ca73ad6e --- /dev/null +++ b/testcase/bcs/original_poc25b.dat @@ -0,0 +1,40 @@ +See Spectras from Eva's Global Model +for details of data sources +Col 2 = absorption (m2 particle-1) +Col 3 = scattering (m2 particle-1) +Col 4 = backscattering (m2 particle-1) +Format I5,3E10.2 + 250 2.55E-03 4.25E-02 2.30E-04 + 325 2.55E-03 4.25E-02 2.30E-04 + 350 2.55E-03 4.25E-02 2.30E-04 + 375 2.55E-03 4.25E-02 2.30E-04 + 400 2.55E-03 4.25E-02 2.30E-04 + 425 2.06E-03 4.00E-02 2.16E-04 + 450 1.63E-03 3.54E-02 1.92E-04 + 475 1.33E-03 3.63E-02 1.96E-04 + 500 1.08E-03 3.46E-02 1.87E-04 + 525 8.67E-04 3.28E-02 1.77E-04 + 550 7.06E-04 3.13E-02 1.69E-04 + 575 5.77E-04 3.01E-02 1.63E-04 + 600 4.64E-04 2.89E-02 1.56E-04 + 625 3.74E-04 2.78E-02 1.51E-04 + 650 3.03E-04 2.63E-02 1.42E-04 + 675 2.48E-04 2.57E-02 1.39E-04 + 700 2.01E-04 2.49E-02 1.35E-04 + 725 0.0 0.0 0.0 + 775 0.0 0.0 0.0 + 850 0.0 0.0 0.0 + 950 0.0 0.0 0.0 + 1050 0.0 0.0 0.0 + 1150 0.0 0.0 0.0 + 1250 0.0 0.0 0.0 + 1350 0.0 0.0 0.0 + 1450 0.0 0.0 0.0 + 1550 0.0 0.0 0.0 + 1650 0.0 0.0 0.0 + 1750 0.0 0.0 0.0 + 1900 0.0 0.0 0.0 + 2200 0.0 0.0 0.0 + 2900 0.0 0.0 0.0 + 3700 0.0 0.0 0.0 + 4000 0.0 0.0 0.0 diff --git a/testcase/bcs/poc25b_priorOptim.dat b/testcase/bcs/poc25b_priorOptim.dat new file mode 100755 index 00000000..aa80d91a --- /dev/null +++ b/testcase/bcs/poc25b_priorOptim.dat @@ -0,0 +1,40 @@ +Detritus c-specific absorption and scatter +Computed in 13PFTs_&constituents_data_files_4columns.R +a from Gallegos 2011 (m2 mgC-1) +b from Gallegos 2011 (m2 mgC-1) +bb is the actual value (m2 mgC-1), computed from non-spectral bb ratio = 0.005 +Format I5,3E10.2 + 250 1.76E-02 4.30E-02 2.15E-04 + 325 6.00E-03 3.74E-02 1.87E-04 + 350 4.30E-03 3.60E-02 1.80E-04 + 375 3.10E-03 3.48E-02 1.74E-04 + 400 2.30E-03 3.37E-02 1.69E-04 + 425 1.60E-03 3.27E-02 1.64E-04 + 450 1.20E-03 3.18E-02 1.59E-04 + 475 8.00E-04 3.09E-02 1.55E-04 + 500 6.00E-04 3.02E-02 1.51E-04 + 525 4.00E-04 2.94E-02 1.47E-04 + 550 3.00E-04 2.88E-02 1.44E-04 + 575 2.00E-04 2.81E-02 1.41E-04 + 600 2.00E-04 2.75E-02 1.38E-04 + 625 1.00E-04 2.70E-02 1.35E-04 + 650 1.00E-04 2.64E-02 1.32E-04 + 675 1.00E-04 2.60E-02 1.30E-04 + 700 0.00E+00 2.55E-02 1.27E-04 + 725 0.00E+00 2.49E-02 1.25E-04 + 775 0.00E+00 2.41E-02 1.21E-04 + 850 0.00E+00 2.30E-02 1.15E-04 + 950 0.00E+00 2.19E-02 1.09E-04 + 1050 0.00E+00 2.08E-02 1.04E-04 + 1150 0.00E+00 1.99E-02 9.90E-05 + 1250 0.00E+00 1.91E-02 9.50E-05 + 1350 0.00E+00 1.84E-02 9.20E-05 + 1450 0.00E+00 1.77E-02 8.90E-05 + 1550 0.00E+00 1.71E-02 8.60E-05 + 1650 0.00E+00 1.66E-02 8.30E-05 + 1750 0.00E+00 1.61E-02 8.00E-05 + 1900 0.00E+00 1.53E-02 7.70E-05 + 2200 0.00E+00 1.41E-02 7.00E-05 + 2900 0.00E+00 1.25E-02 6.20E-05 + 3700 0.00E+00 1.11E-02 5.60E-05 + 4000 0.0 0.0 0.0 From dd035737e113b93de080bbe7ff134ffa9020ea51 Mon Sep 17 00:00:00 2001 From: Paolo Lazzari Date: Fri, 5 Dec 2025 14:15:43 +0100 Subject: [PATCH 13/97] include separate subroutines for native bfm and fabm --- src/BIO/trcbio_bfm.f90 | 215 ++++++++++++++++++++++++ src/BIO/{trcbio.f90 => trcbio_fabm.f90} | 4 +- 2 files changed, 217 insertions(+), 2 deletions(-) create mode 100644 src/BIO/trcbio_bfm.f90 rename src/BIO/{trcbio.f90 => trcbio_fabm.f90} (99%) diff --git a/src/BIO/trcbio_bfm.f90 b/src/BIO/trcbio_bfm.f90 new file mode 100644 index 00000000..6d408c47 --- /dev/null +++ b/src/BIO/trcbio_bfm.f90 @@ -0,0 +1,215 @@ + + SUBROUTINE trcbio_bfm +!!!--------------------------------------------------------------------- +!!! +!!! ROUTINE trcbio_bfm +!!! ******************* +!!! +!!! PURPOSE : +!!! --------- +!!! compute the now trend due to biogeochemical processes +!!! and add it to the general trend of passive tracers equations. +!!! +!!! Three options: +!!! +!!! METHOD : +!!! ------- +!!! each now biological flux is calculated in FUNCTION of now +!!! concentrations of tracers. +!!! depending on the tracer, these fluxes are sources or sinks. +!!! the total of the sources and sinks for each tracer +!!! is added to the general trend. +!!! +!!! tra = tra + zf...tra - zftra... +!!! | | +!!! | | +!!! source sink +!!! +!!! +!!! IF 'key_trc_diabio' key is activated, the biogeochemical +!!! trends for passive tracers are saved for futher diagnostics. +!!! +!!! multitasked on vertical slab (jj-loop) +!!! +!!! MODIFICATIONS: +!!! -------------- + + USE myalloc + USE BIO_mem + USE OPT_mem, ONLY: PAR, RMU + USE BC_mem + USE mpi + +!!! FABM IMPLEMENTATION + USE fabm + + +! ---------------------------------------------------------------------- +! BEGIN BC_REFACTORING SECTION +! --------------------------------------------------------------------- + + use bc_set_mod + +! ---------------------------------------------------------------------- +! END BC_REFACTORING SECTION +! --------------------------------------------------------------------- + + IMPLICIT NONE + + +!!!---------------------------------------------------------------------- +!!! local declarations +!!! ================== + + double precision,dimension(jptra,jpk) :: b + double precision,dimension(jpk,jptra) :: a + double precision,dimension(4,jpk) :: c + double precision,dimension(jptra_dia,jpk) :: d + double precision,dimension(jpk,16) :: er + double precision,dimension(jptra_dia_2d) :: d2 + + + integer :: jk,jj,ji,jb,jn + integer :: jtr,jtrmax,tra_idx + integer :: bottom + double precision :: correct_fact + + +!!!---------------------------------------------------------------------- +!!! statement functions +!!! =================== + + +! | --------------| +! | BFM MODEL CALL| +! | --------------| + + BIOparttime = MPI_WTIME() + + surf_mask(:) = 0. + surf_mask(1) = 1. +! ------------------------------------------------- + + ! tra_idx = tra_matrix_gib(1) + jtrmax=jptra + +! ---------------- Fuori dai punti BFM + + ogstm_sediPI=0. + tra_DIA = 0. + tra_DIA_2d = 0. ! da sistemare + + +! Initialization + a = 1.0 + er = 1.0 + er(:,10) = 8.1 + + +#ifdef gdept1d +! er(:,11) is calculated outside the loop on ji,jj + do jk=1, jpk + correct_fact= 1.0D0 + + if ( (gdept(jk) .GT. 1000.0D0 ) .AND. (gdept(jk) .LT. 2000.0D0 )) then + correct_fact= 0.25D0 + endif + + if (gdept(jk) .GE. 2000.0D0 ) then + correct_fact= 0.0D0 + endif + + er(jk,11) = correct_fact * ( gdept(jpk)-gdept(jk) ) /gdept(jpk) + enddo +#endif + + + DO ji=1,jpi + DO jj=1,jpj + if (bfmmask(1,jj,ji) == 0) CYCLE + bottom = mbathy(jj,ji) + + + DO jtr=1, jtrmax + + a(1:bottom, jtr) = trn(1:bottom,jj,ji,jtr) ! current biogeochemical concentrations + + END DO + +! Environmental regulating factors (er,:) + + er(1:bottom,1) = tn (1:bottom,jj,ji)! Temperature (Celsius) + er(1:bottom,2) = sn (1:bottom,jj,ji) ! Salinity PSU + er(1:bottom,3) = rho(1:bottom,jj,ji) ! Density Kg/m3 + er(1 ,4) = ice ! from 0 to 1 adimensional + er(1 ,5) = ogstm_co2(jj,ji) ! CO2 Mixing Ratios (ppm) 390 + er(1:bottom,6) = PAR(1:bottom,jj,ji,1) ! PAR for diatoms + er(1:bottom,7) = PAR(1:bottom,jj,ji,2) ! PAR for flagellates + er(1:bottom,8) = PAR(1:bottom,jj,ji,3) ! PAR for pico phytoplankton + er(1:bottom,9) = PAR(1:bottom,jj,ji,4) ! PAR for dinoflagellates + er(1:bottom,10) = PAR(1:bottom,jj,ji,5) ! total PAR for CDOM + er(1 ,11) = DAY_LENGTH(jj,ji) ! fotoperiod expressed in hours + er(1:bottom,12) = e3t(1:bottom,jj,ji) ! depth in meters of the given cell + er(1 ,13) = vatm(jj,ji) ! wind speed (m/s) + er(1:bottom,14) = ogstm_PH(1:bottom,jj,ji) ! 8.1 + er(1 ,15) = RMU(jj,ji) ! avg. cosine direct + +#ifndef gdept1d + do jk=1,bottom + correct_fact= 1.0D0 + if ( (gdept(jk,jj,ji) .GT. 1000.0D0 ) .AND. (gdept(jk,jj,ji) .LT. 2000.0D0)) then + correct_fact= 0.25D0 + endif + + if (gdept(jk,jj,ji) .GE. 2000.0D0 ) then + correct_fact= 0.0D0 + endif + + er(jk,16) = correct_fact * ( gdept(jpk,jj,ji)-gdept(jk,jj,ji) ) /gdept(jpk,jj,ji) + enddo +#endif + call BFM1D_Input_EcologyDynamics(bottom,a,jtrmax,er) + + call BFM1D_reset() + + call EcologyDynamics() + + call BFM1D_Output_EcologyDynamics(b, c, d, d2) + + DO jtr=1, jtrmax + tra(1:bottom,jj,ji,jtr) =tra(1:bottom,jj,ji,jtr) +b(jtr,1:bottom) ! trend + END DO + + DO jtr=1,4 + ogstm_sediPI(1:bottom,jj,ji,jtr) = c(jtr,1:bottom) ! BFM output of sedimentation speed (m/d) + END DO + + + DO jk = 1,bottom + DO jtr=1,jptra_dia + tra_DIA(jtr, jk ,jj,ji) = d(jtr,jk) ! diagnostic + END DO + ENDDO + + tra_DIA_2d(:,jj,ji) = d2(:) ! diagnostic + + ogstm_PH(1:bottom,jj,ji) = d(pppH,1:bottom) ! Follows solver guess, put 8.0 if pppH is not defined + + END DO + END DO + +! ---------------------------------------------------------------------- +! BEGIN BC_REFACTORING SECTION +! --------------------------------------------------------------------- + + call boundaries%fix_diagnostic_vars(tra_DIA, tra_DIA_2d) + +! ---------------------------------------------------------------------- +! END BC_REFACTORING SECTION +! --------------------------------------------------------------------- + + + BIOparttime = MPI_WTIME() -BIOparttime + BIOtottime = BIOtottime + BIOparttime + + END SUBROUTINE trcbio_bfm diff --git a/src/BIO/trcbio.f90 b/src/BIO/trcbio_fabm.f90 similarity index 99% rename from src/BIO/trcbio.f90 rename to src/BIO/trcbio_fabm.f90 index d1162d61..1f5f057c 100644 --- a/src/BIO/trcbio.f90 +++ b/src/BIO/trcbio_fabm.f90 @@ -1,5 +1,5 @@ - SUBROUTINE trcbio + SUBROUTINE trcbio_fabm !!!--------------------------------------------------------------------- !!! !!! ROUTINE trcbio @@ -212,4 +212,4 @@ SUBROUTINE trcbio BIOparttime = MPI_WTIME() -BIOparttime BIOtottime = BIOtottime + BIOparttime - END SUBROUTINE trcbio + END SUBROUTINE trcbio_fabm From 21949b73cdb9fefd9e81ff063234cf7a23256a94 Mon Sep 17 00:00:00 2001 From: Paolo Lazzari Date: Fri, 5 Dec 2025 14:19:28 +0100 Subject: [PATCH 14/97] select coupling with fabm --- src/BIO/trcsms.f90 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/BIO/trcsms.f90 b/src/BIO/trcsms.f90 index f995104b..7b11281f 100644 --- a/src/BIO/trcsms.f90 +++ b/src/BIO/trcsms.f90 @@ -36,7 +36,7 @@ SUBROUTINE trcsms(datestring) CALL trcopt ! tracers: optical model - CALL trcbio ! tracers: biological model + CALL trcbio_fabm ! tracers: biological model !! trcsed no updated for time step advancing #if defined key_trc_sed From 9d312a0f17b159ecd179902b002e702a9b9bac92 Mon Sep 17 00:00:00 2001 From: Paolo Lazzari Date: Fri, 5 Dec 2025 15:32:10 +0100 Subject: [PATCH 15/97] added more initialization functions, the creation of the model is currently in a bad position with the BIOmem allocation function --- src/BIO/BIO_mem.f90 | 23 +++++++++++++++++++++++ src/BIO/trcbio_bfm.f90 | 3 --- src/BIO/trcbio_fabm.f90 | 3 ++- src/General/ogstm.f90 | 6 +----- 4 files changed, 26 insertions(+), 9 deletions(-) diff --git a/src/BIO/BIO_mem.f90 b/src/BIO/BIO_mem.f90 index 45342594..20596c7a 100644 --- a/src/BIO/BIO_mem.f90 +++ b/src/BIO/BIO_mem.f90 @@ -4,6 +4,10 @@ MODULE BIO_mem USE myalloc USE TIME_MANAGER +#ifdef key_trc_fabm + USE fabm +#endif + #ifdef Mem_Monitor USE check_mem USE iso_c_binding @@ -22,6 +26,9 @@ MODULE BIO_mem double precision, allocatable :: NPPF2(:,:,:) double precision, allocatable :: ogstm_co2(:,:), co2_IO(:,:,:) double precision:: ice +#ifdef key_trc_fabm + class (type_fabm_model), pointer :: model_fabm +#endif !!!---------------------------------------------------------------------- @@ -30,6 +37,7 @@ MODULE BIO_mem subroutine myalloc_BIO() INTEGER :: err + INTEGER :: ivar double precision :: aux_mem #ifdef Mem_Monitor @@ -58,6 +66,21 @@ subroutine myalloc_BIO() NPPF2 = 0 ! nut huge, because it will be assigned only in trcBIO in BFMpoints ! and used in hard_tissue_pump.F also in land points ice=0 +#ifdef key_trc_fabm + ! Provide extents of the spatial domain (number of layers nz for a 1D column) + model_fabm => fabm_create_model() + call model_fabm%set_domain(jpk,jpj,jpi) + ! At this point (after the call to fabm_create_model), memory should be + ! allocated to hold the values of all size(model%interior_state_variables) state variables. + ! Where this memory resides and how it is laid out is typically host-specific. + ! Below, we assume all state variable values are combined in an array interior_state with + ! shape nx, ny, nz, size(model%interior_state_variables). + + ! Point FABM to your state variable data + do ivar = 1, size(model_fabm%interior_state_variables) + call model_fabm%link_interior_state_data(ivar, trn(:,:,:,ivar)) + end do +#endif #ifdef Mem_Monitor mem_all=get_mem(err) - aux_mem diff --git a/src/BIO/trcbio_bfm.f90 b/src/BIO/trcbio_bfm.f90 index 6d408c47..8844442f 100644 --- a/src/BIO/trcbio_bfm.f90 +++ b/src/BIO/trcbio_bfm.f90 @@ -40,9 +40,6 @@ SUBROUTINE trcbio_bfm USE BC_mem USE mpi -!!! FABM IMPLEMENTATION - USE fabm - ! ---------------------------------------------------------------------- ! BEGIN BC_REFACTORING SECTION diff --git a/src/BIO/trcbio_fabm.f90 b/src/BIO/trcbio_fabm.f90 index 1f5f057c..2176cb54 100644 --- a/src/BIO/trcbio_fabm.f90 +++ b/src/BIO/trcbio_fabm.f90 @@ -70,6 +70,7 @@ SUBROUTINE trcbio_fabm integer :: jk,jj,ji,jb,jn + integer :: ivar integer :: jtr,jtrmax,tra_idx integer :: bottom double precision :: correct_fact @@ -86,6 +87,7 @@ SUBROUTINE trcbio_fabm BIOparttime = MPI_WTIME() + surf_mask(:) = 0. surf_mask(1) = 1. ! ------------------------------------------------- @@ -129,7 +131,6 @@ SUBROUTINE trcbio_fabm if (bfmmask(1,jj,ji) == 0) CYCLE bottom = mbathy(jj,ji) - DO jtr=1, jtrmax a(1:bottom, jtr) = trn(1:bottom,jj,ji,jtr) ! current biogeochemical concentrations diff --git a/src/General/ogstm.f90 b/src/General/ogstm.f90 index d78c27a9..38e4b807 100644 --- a/src/General/ogstm.f90 +++ b/src/General/ogstm.f90 @@ -107,10 +107,6 @@ SUBROUTINE ogstm_initialize() IMPLICIT NONE -#ifdef key_trc_fabm - class (type_fabm_model), pointer :: model -#endif - ! local declarations ! ================== ! ********************************************* @@ -202,7 +198,7 @@ SUBROUTINE ogstm_initialize() #endif #ifdef key_trc_fabm - model => fabm_create_model() +! model_fabm => fabm_create_model() #endif From f653e5714d6fec55675f266abda9627b05287433 Mon Sep 17 00:00:00 2001 From: Paolo Lazzari Date: Thu, 15 Jan 2026 12:13:37 +0100 Subject: [PATCH 16/97] include switch between bfm old style and fabm --- src/BIO/trcsms.f90 | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/BIO/trcsms.f90 b/src/BIO/trcsms.f90 index 7b11281f..038f3572 100644 --- a/src/BIO/trcsms.f90 +++ b/src/BIO/trcsms.f90 @@ -36,7 +36,13 @@ SUBROUTINE trcsms(datestring) CALL trcopt ! tracers: optical model +#if defined key_trc_fabm CALL trcbio_fabm ! tracers: biological model +# endif + +#if defined key_trc_bfm + CALL trcbio_bfm ! tracers: biological model +# endif !! trcsed no updated for time step advancing #if defined key_trc_sed From 52c2e156e18adace99034bea1691d5fbef01d576 Mon Sep 17 00:00:00 2001 From: Paolo Lazzari Date: Thu, 15 Jan 2026 12:14:18 +0100 Subject: [PATCH 17/97] remove bfm code when bfm not active --- src/BIO/trcbio_bfm.f90 | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/BIO/trcbio_bfm.f90 b/src/BIO/trcbio_bfm.f90 index 8844442f..af476876 100644 --- a/src/BIO/trcbio_bfm.f90 +++ b/src/BIO/trcbio_bfm.f90 @@ -53,6 +53,8 @@ SUBROUTINE trcbio_bfm IMPLICIT NONE + #ifdef key_trc_bfm + !!!---------------------------------------------------------------------- !!! local declarations @@ -209,4 +211,5 @@ SUBROUTINE trcbio_bfm BIOparttime = MPI_WTIME() -BIOparttime BIOtottime = BIOtottime + BIOparttime + #endif END SUBROUTINE trcbio_bfm From f41ed18df7f1150d17126f445fdf87d12832eea0 Mon Sep 17 00:00:00 2001 From: Paolo Lazzari Date: Fri, 16 Jan 2026 17:51:31 +0100 Subject: [PATCH 18/97] Make ogstm agnostic with respect to biogeochemical model used, remove reference to BFM if key_trc_bfm not active, default model is one passive tracer --- src/BIO/{trcbio_bfm.f90 => trcbio_bfm.F90} | 0 src/BIO/{trcbio_fabm.f90 => trcbio_fabm.F90} | 0 src/General/DEFAULT_var_list.h | 26 ++++++++++++++++++++ 3 files changed, 26 insertions(+) rename src/BIO/{trcbio_bfm.f90 => trcbio_bfm.F90} (100%) rename src/BIO/{trcbio_fabm.f90 => trcbio_fabm.F90} (100%) create mode 100644 src/General/DEFAULT_var_list.h diff --git a/src/BIO/trcbio_bfm.f90 b/src/BIO/trcbio_bfm.F90 similarity index 100% rename from src/BIO/trcbio_bfm.f90 rename to src/BIO/trcbio_bfm.F90 diff --git a/src/BIO/trcbio_fabm.f90 b/src/BIO/trcbio_fabm.F90 similarity index 100% rename from src/BIO/trcbio_fabm.f90 rename to src/BIO/trcbio_fabm.F90 diff --git a/src/General/DEFAULT_var_list.h b/src/General/DEFAULT_var_list.h new file mode 100644 index 00000000..09d6cc6a --- /dev/null +++ b/src/General/DEFAULT_var_list.h @@ -0,0 +1,26 @@ + INTEGER, parameter :: jptra=1 + + INTEGER, parameter :: jptra_var=1 + + INTEGER, parameter :: jptra_flux=1 + + INTEGER, parameter :: jptra_dia=jptra_var + jptra_flux + + INTEGER, parameter :: jptra_dia_2d=1 + + +! State variables indexes + integer,parameter :: ppDEFAULT1=1 + + +! Diagnostic indexes + integer,parameter :: ppDEFAULT2=2 + + +! Flux indexes + integer, parameter:: ppDEFAULT3=3 + + +! Variables 2d + integer, parameter:: ppDEFAULT4=4 + From fcec60264a815e96a6c52fa6c4e98c6213b8dcee Mon Sep 17 00:00:00 2001 From: Paolo Lazzari Date: Fri, 16 Jan 2026 17:52:54 +0100 Subject: [PATCH 19/97] finalize previuos commit: Make ogstm agnostic with respect to biogeochemical model used, remove reference to BFM if key_trc_bfm not active, default model is one passive tracer --- src/BIO/SED_mem.f90 | 3 +++ src/BIO/trcbio_bfm.F90 | 4 ++-- src/BIO/trcbio_fabm.F90 | 3 ++- src/BIO/trcsed.f90 | 3 ++- src/General/ogstm.f90 | 10 +++++----- src/General/parameter.f90 | 16 +++++++++------- src/General/parlec.f90 | 15 +++++++++++++++ src/IO/BC_mem.f90 | 24 +++++++++++++++++++++++- 8 files changed, 61 insertions(+), 17 deletions(-) diff --git a/src/BIO/SED_mem.f90 b/src/BIO/SED_mem.f90 index 6b0a87a2..0c52cae3 100644 --- a/src/BIO/SED_mem.f90 +++ b/src/BIO/SED_mem.f90 @@ -48,6 +48,7 @@ subroutine myalloc_SED() allocate(sed_idx(nsed)) sed_idx = huge(sed_idx(1)) +#ifdef key_trc_bfm sed_idx(1) = ppR6c sed_idx(2) = ppR6n @@ -80,6 +81,8 @@ subroutine myalloc_SED() sed_idx(24) = ppP4p sed_idx(25) = ppP4l sed_idx(26) = ppO5c +#endif + allocate(jarr_sed(2, jpi*jpj)) jarr_sed = huge(jarr_sed(1,1)) allocate(jarr_sed_flx(jpk,jpi*jpj)) diff --git a/src/BIO/trcbio_bfm.F90 b/src/BIO/trcbio_bfm.F90 index af476876..a5424c43 100644 --- a/src/BIO/trcbio_bfm.F90 +++ b/src/BIO/trcbio_bfm.F90 @@ -53,7 +53,7 @@ SUBROUTINE trcbio_bfm IMPLICIT NONE - #ifdef key_trc_bfm +#ifdef key_trc_bfm !!!---------------------------------------------------------------------- @@ -211,5 +211,5 @@ SUBROUTINE trcbio_bfm BIOparttime = MPI_WTIME() -BIOparttime BIOtottime = BIOtottime + BIOparttime - #endif +#endif END SUBROUTINE trcbio_bfm diff --git a/src/BIO/trcbio_fabm.F90 b/src/BIO/trcbio_fabm.F90 index 2176cb54..7f66fc0a 100644 --- a/src/BIO/trcbio_fabm.F90 +++ b/src/BIO/trcbio_fabm.F90 @@ -1,5 +1,6 @@ SUBROUTINE trcbio_fabm +#ifdef key_trc_fabm !!!--------------------------------------------------------------------- !!! !!! ROUTINE trcbio @@ -212,5 +213,5 @@ SUBROUTINE trcbio_fabm BIOparttime = MPI_WTIME() -BIOparttime BIOtottime = BIOtottime + BIOparttime - +#endif END SUBROUTINE trcbio_fabm diff --git a/src/BIO/trcsed.f90 b/src/BIO/trcsed.f90 index 6a237464..8af214b8 100644 --- a/src/BIO/trcsed.f90 +++ b/src/BIO/trcsed.f90 @@ -203,11 +203,12 @@ SUBROUTINE trcsed #endif END DO -#endif END DO MAIN_LOOP +#endif + !!!$omp end parallel do diff --git a/src/General/ogstm.f90 b/src/General/ogstm.f90 index 38e4b807..8d449819 100644 --- a/src/General/ogstm.f90 +++ b/src/General/ogstm.f90 @@ -189,17 +189,16 @@ SUBROUTINE ogstm_initialize() call init_phys ! Initiialization of Biogeochemical reactor with 1D approach - parallel_rank=myrank #ifdef key_trc_bfm + + parallel_rank=myrank + call BFM0D_NO_BOXES(jpk,1,1,jpk,1) call Init_bfm() call BFM0D_INIT_IO_CHANNELS() call Initialize() #endif -#ifdef key_trc_fabm -! model_fabm => fabm_create_model() -#endif call init_opt @@ -386,8 +385,9 @@ SUBROUTINE set_to_zero() tn = 0.0 sn = 0.0 ! Passive tracers arrays set to zero - +# if defined key_trc_bfm xpar = 0.0 +# endif trn = 0.0 tra = 0.0 diff --git a/src/General/parameter.f90 b/src/General/parameter.f90 index bfc6034c..d5e7ddfa 100644 --- a/src/General/parameter.f90 +++ b/src/General/parameter.f90 @@ -52,21 +52,23 @@ MODULE modul_param !! Passive tracers parameter -#ifdef key_trc_bfm - !! WARNING the var below must be become input parameter -! INTEGER, parameter :: jptra = 51 -! INTEGER, parameter :: jptra_dia = 21 -! INTEGER, parameter :: jptra_dia_2d = 1 +#ifdef key_trc_bfm #include "BFM_var_list.h" +#elif key_trc_fabm + +#else + +#include "DEFAULT_var_list.h" + +#endif + !! productive layer depth INTEGER :: jpkb , & ! : first vertical layers where biology is active & jpkbm1 ! jpkb - 1 -#endif - END MODULE modul_param diff --git a/src/General/parlec.f90 b/src/General/parlec.f90 index c618d7a4..96435133 100644 --- a/src/General/parlec.f90 +++ b/src/General/parlec.f90 @@ -37,8 +37,13 @@ SUBROUTINE parlec NAMELIST/namhdf/ aht0 NAMELIST/nameos/ neos, rau0, ralpha, rbeta +#ifdef key_trc_bfm namelist /natnum/ rdt,variable_rdt, rsc,rtrn,ncor,ndttrc,ladv, lhdf, lsbc, lbfm, lzdf, lsnu, latmosph, & ahtrb0,trcrat,ahtrc0,vsedR6,vsedR8,vsedO5c, photop,atlantic_bfm,bottom_flux,Euphotic_lev, IS_FREE_SURFACE +#else + namelist /natnum/ rdt,variable_rdt, rsc,rtrn,ncor,ndttrc,ladv, lhdf, lsbc, lbfm, lzdf, lsnu, latmosph, & + ahtrb0,trcrat,ahtrc0,photop,atlantic_bfm,Euphotic_lev, IS_FREE_SURFACE +#endif NAMELIST/General_IO/ nwritetrc, freq_ave_phys, freq_flux_dump, save_bkp_group2, deflate_ave, deflate_level_ave, deflate_rst, & deflate_level_rst, isCheckLOG, read_W_from_file, internal_sponging, ingv_files_direct_reading, ingv_lon_shift, & mld_flag, DvMLD, sigma, DvBackground @@ -143,12 +148,16 @@ SUBROUTINE parlec ahtrb0 = 0. trcrat = 1. ahtrc0 = aht0 +#ifdef key_trc_bfm vsedR6 = 7.0 vsedR8 = 15.0 vsedO5c = 30.0 +#endif photop = .FALSE. atlantic_bfm= .FALSE. +#ifdef key_trc_bfm bottom_flux = 0. +#endif Euphotic_lev = 200. IS_FREE_SURFACE = .true. @@ -177,15 +186,20 @@ SUBROUTINE parlec WRITE(numout,*) ' background diffusivity for passive tr = ', ahtrb0 WRITE(numout,*) ' ratio betweeen passive and active tr diffusion coeff= ', trcrat WRITE(numout,*) ' horizontal eddy diffus. for passive tr = ', ahtrc0 +#ifdef key_trc_bfm WRITE(numout,*) ' small detritus sedimentation speed vsedR6 =', vsedR6/86400 WRITE(numout,*) ' large detritus sedimentation speed vsedR8 =', vsedR8/86400 WRITE(numout,*) ' calcite sedimentation speed vsedO5c =', vsedO5c/86400 +#endif WRITE(numout,*) ' photoperiod scaling photop =', photop WRITE(numout,*) ' activation of bfm in atlantic buffer =', atlantic_bfm +#ifdef key_trc_bfm WRITE(numout,*) ' bottom flux [0,1], 0 -> no flux, 1 -> total flux =', bottom_flux +#endif WRITE(numout,*) ' Euphotic level = ', Euphotic_lev ENDIF +#ifdef key_trc_bfm IF (vsedR6 .LT. 0.) THEN write (*,*) 'vsedR6 must be greated than 0 instead it is:', vsedR6/86400 STOP @@ -203,6 +217,7 @@ SUBROUTINE parlec write (*,*) 'bottom flux must be in [0,1] instead it is:', bottom_flux STOP ENDIF +#endif diff --git a/src/IO/BC_mem.f90 b/src/IO/BC_mem.f90 index 0cae6af8..abaee5ba 100644 --- a/src/IO/BC_mem.f90 +++ b/src/IO/BC_mem.f90 @@ -114,7 +114,6 @@ SUBROUTINE alloc_DTATRC jn_gib = 6 ! jn_riv = 6 - jn_atm = 2 ! resto is kept just to provide compliance with bfmv2, but should be removed with bfmv5 allocate(resto(jpk,jpj,jpi,jn_gib)) @@ -166,6 +165,18 @@ SUBROUTINE alloc_DTATRC ! ENDIF IF ((lat .NE. 0) .AND. (lon .NE. 0)) THEN +#ifdef key_trc_bfm + jn_atm = 2 + +#elif key_trc_fabm + + jn_atm = ? + +#else + + jn_atm = 1 +#endif + allocate(tra_matrix_atm(jn_atm)) tra_matrix_atm = huge(tra_matrix_atm(1)) allocate(atm_aux(jpj,jpi)) @@ -173,8 +184,19 @@ SUBROUTINE alloc_DTATRC allocate(atm_idxtglo( jpj,jpi)) atm_idxtglo = huge(atm_idxtglo(1,1)) +#ifdef key_trc_bfm + tra_matrix_atm(1) = ppN1p ! phosphates tra_matrix_atm(2) = ppN3n ! nitrates + +#elif key_trc_fabm + +#else + + tra_matrix_atm(1) = ppDEFAULT1 + +#endif + ENDIF From 8771f2a41f0ca755faceb5a3f9519554c48cb4cc Mon Sep 17 00:00:00 2001 From: Paolo Lazzari Date: Tue, 20 Jan 2026 11:42:42 +0100 Subject: [PATCH 20/97] add test namelists for different BGC-TYPE --- testcase/namelist.init.default | 84 ++++++++++++++++++++++++++++ testcase/namelist.init.fabm | 84 ++++++++++++++++++++++++++++ testcase/namelist.passivetrc.default | 25 +++++++++ 3 files changed, 193 insertions(+) create mode 100644 testcase/namelist.init.default create mode 100644 testcase/namelist.init.fabm create mode 100644 testcase/namelist.passivetrc.default diff --git a/testcase/namelist.init.default b/testcase/namelist.init.default new file mode 100644 index 00000000..21a46ffb --- /dev/null +++ b/testcase/namelist.init.default @@ -0,0 +1,84 @@ +&NAMHDF + aht0 = -3.e9, +/ +&NAMEOS + neos = 0, + Rau0 = 1020., + ralpha = 2.e-4, + rbeta = 0.001, +/ +&NAMRUN + CalendarType = 1, + nsptint = 1, +/ + +&natnum + rdt = 1800, + variable_rdt = .false. + rsc = 1., + rtrn = 1.e-25, + ndttrc = 1.0, + ncor = 1, + ladv = .true., + lhdf = .true., + latmosph = .true., + lsbc = .false., + lbfm = .false., + lzdf = .true., + lsnu = .true., +! vsedR6 = 7.0, +! vsedR8 = 15.0, +! vsedO5c = 30.0, + photop = .false. + atlantic_bfm = .true. +! bottom_flux = 1. + Euphotic_lev = 200. + is_free_surface = .false. +/ + +&General_IO + + nwritetrc = 10000, + freq_ave_phys = 1 ! 0 = none, 1=group 1, 2 = group 2 + freq_flux_dump = 1 ! 1=group 1, 2 = group 2 + save_bkp_group2 = .true. + deflate_ave = 0 + deflate_level_ave = 4 + deflate_rst = 1 + deflate_level_rst = 4 + isCheckLOG = .false. + read_W_from_file = .false. + internal_sponging = .true. + ingv_files_direct_reading = .true. + ingv_lon_shift = 0 + mld_flag = .false. + DvMLD = 1.0 + sigma = 0.3 + DvBackground = 1.e-07 +/ + + + +&Domain_Characteristic + jperio=0 +/ + +&DA_setup + DA_Nprocs = 20, + TREd_procs_per_node = 5, + max_procs_per_one_node = 9, + satfile_suffix = "_d-OC_CNR-L4-CHL-MedOC4_SAM_7KM-MED-REP-v02.nc", + satvarname = "CHL" + AssimilationLevels_sat = 36 + AssimilationLevels_float = 50 +/ + +&Number_Fluxes + jpflx = 13, + jpwind=3, + jpemp=4, + jpice=5, + jpqsr=6, + jpkef=7, +/ + diff --git a/testcase/namelist.init.fabm b/testcase/namelist.init.fabm new file mode 100644 index 00000000..21a46ffb --- /dev/null +++ b/testcase/namelist.init.fabm @@ -0,0 +1,84 @@ +&NAMHDF + aht0 = -3.e9, +/ +&NAMEOS + neos = 0, + Rau0 = 1020., + ralpha = 2.e-4, + rbeta = 0.001, +/ +&NAMRUN + CalendarType = 1, + nsptint = 1, +/ + +&natnum + rdt = 1800, + variable_rdt = .false. + rsc = 1., + rtrn = 1.e-25, + ndttrc = 1.0, + ncor = 1, + ladv = .true., + lhdf = .true., + latmosph = .true., + lsbc = .false., + lbfm = .false., + lzdf = .true., + lsnu = .true., +! vsedR6 = 7.0, +! vsedR8 = 15.0, +! vsedO5c = 30.0, + photop = .false. + atlantic_bfm = .true. +! bottom_flux = 1. + Euphotic_lev = 200. + is_free_surface = .false. +/ + +&General_IO + + nwritetrc = 10000, + freq_ave_phys = 1 ! 0 = none, 1=group 1, 2 = group 2 + freq_flux_dump = 1 ! 1=group 1, 2 = group 2 + save_bkp_group2 = .true. + deflate_ave = 0 + deflate_level_ave = 4 + deflate_rst = 1 + deflate_level_rst = 4 + isCheckLOG = .false. + read_W_from_file = .false. + internal_sponging = .true. + ingv_files_direct_reading = .true. + ingv_lon_shift = 0 + mld_flag = .false. + DvMLD = 1.0 + sigma = 0.3 + DvBackground = 1.e-07 +/ + + + +&Domain_Characteristic + jperio=0 +/ + +&DA_setup + DA_Nprocs = 20, + TREd_procs_per_node = 5, + max_procs_per_one_node = 9, + satfile_suffix = "_d-OC_CNR-L4-CHL-MedOC4_SAM_7KM-MED-REP-v02.nc", + satvarname = "CHL" + AssimilationLevels_sat = 36 + AssimilationLevels_float = 50 +/ + +&Number_Fluxes + jpflx = 13, + jpwind=3, + jpemp=4, + jpice=5, + jpqsr=6, + jpkef=7, +/ + diff --git a/testcase/namelist.passivetrc.default b/testcase/namelist.passivetrc.default new file mode 100644 index 00000000..bbc0d4b2 --- /dev/null +++ b/testcase/namelist.passivetrc.default @@ -0,0 +1,25 @@ +&NATTRC + ctrcnm(1)="N1p" + ctrcun(1)="mmol P/m3" + ctrmax(1)=1.000000e+0 + ctr_hf(1)=1 +/ + +&NATTRC_DIAG + dianm(1)="ETW" + diaun(1)="C" + diahf(1)=0 + diaWR(1)=0 + + dianm(2)="ESW" + diaun(2)="PSU" + diahf(2)=0 + diaWR(2)=0 +/ + +&NATTRC_DIAG_2D + dianm_2d(1)="COSED" + diaun_2d(1)="-" + diahf_2d(1)=0 + diaWR_2d(1)=0 +/ From dea3972811643b224dfd25dff157e345432ed5b5 Mon Sep 17 00:00:00 2001 From: Paolo Lazzari Date: Tue, 20 Jan 2026 11:43:33 +0100 Subject: [PATCH 21/97] add configuration column for BGC-TYPE --- testcase/TEST_LIST.dat_template | 4 ++-- testcase/deploy_code.py | 23 ++++++++++++++++++----- testcase/mydtype.py | 2 +- 3 files changed, 21 insertions(+), 8 deletions(-) diff --git a/testcase/TEST_LIST.dat_template b/testcase/TEST_LIST.dat_template index e3e943ce..87f11560 100644 --- a/testcase/TEST_LIST.dat_template +++ b/testcase/TEST_LIST.dat_template @@ -1,2 +1,2 @@ -Nx Ny Nz nprocx nprocy lon0 lat0 dx dy Start End Directory Code -10 10 43 1 1 8.78125 43.78125 0.128 0.128 20000101-00:00:00 20010101-00:00:00 TEST01/wrkdir/MODEL ~/TEST_CASE1 +Nx Ny Nz nprocx nprocy lon0 lat0 dx dy Start End Directory Code BGC_TYPE +10 10 43 1 1 8.78125 43.78125 0.128 0.128 20000101-00:00:00 20010101-00:00:00 TEST01/wrkdir/MODEL ~/TEST_CASE1 DEFAULT diff --git a/testcase/deploy_code.py b/testcase/deploy_code.py index 94dab951..6e305541 100644 --- a/testcase/deploy_code.py +++ b/testcase/deploy_code.py @@ -17,9 +17,6 @@ def deploy_code(test): CODEPATH = test['Code'].decode() CODEPATH = CODEPATH.replace("~",os.getenv("HOME")) os.system("ln -fs " + CODEPATH + "OGSTM_BUILD_DBG/ogstm.xx "+ test['Dir'].decode() + "/" ) - - namelists= CODEPATH + "/ogstm/ready_for_model_namelists/* " - os.system("cp -pf " + namelists + test['Dir'].decode() + "/") os.system("cp subgen.py " + test['Dir'].decode() ) os.system("cp boundaries.nml " + test['Dir'].decode() ) @@ -32,5 +29,21 @@ def deploy_code(test): print(" ingv_lon_shift = 0 ") print(" is_free_surface = .false.") - fabm_yaml= CODEPATH + "/fabm/extern/ogs/fabm_multispectral_2xDetritus.yaml " - os.system("cp -pf " + fabm_yaml + test['Dir'].decode() + "/fabm.yaml") + if test['BGC_TYPE'].decode() in ['DEFAULT','Default','default']: + os.system("cp -pf namelist.init.default " + test['Dir'].decode() + "/namelist.init") + os.system("cp -pf namelist.passivetrc.default " + test['Dir'].decode() + "/namelist.passivetrc") + + elif test['BGC_TYPE'].decode() in ['BFM','bfm']: + namelists= CODEPATH + "/ogstm/ready_for_model_namelists/* " + os.system("cp -pf " + namelists + test['Dir'].decode() + "/") + + elif test['BGC_TYPE'].decode() in ['FABM','fabm']: + os.system("cp -pf namelist.init.fabm " + test['Dir'].decode() + "/namelist.init") + fabm_yaml= CODEPATH + "/fabm/extern/ogs/fabm_multispectral_2xDetritus.yaml " + os.system("cp -pf " + fabm_yaml + test['Dir'].decode() + "/fabm.yaml") + + else: + + print("BGC_TYPE " + test['BGC_TYPE'].decode() + "wrong/undefined choose within [DEFAULT[Default,default], BFM[bfm], FABM[fabm]]") + sys.exit() + diff --git a/testcase/mydtype.py b/testcase/mydtype.py index 56cfb3bc..0fb9bc9a 100644 --- a/testcase/mydtype.py +++ b/testcase/mydtype.py @@ -7,7 +7,7 @@ ('lon0' ,float),('lat0',float) ,\ ('dx' ,float),('dy' ,float),\ ('Start' ,'S100') ,('End' ,'S100') ,\ - ('Dir','S100'),('Code','S100')]) + ('Dir','S100'),('Code','S100'), ('BGC_TYPE', 'S100')]) ext_data =np.dtype([('date','S17'),('kext',float)]) From 981b6af8149f07b0f3ad37ca5b2611e675d8a1e7 Mon Sep 17 00:00:00 2001 From: Paolo Lazzari Date: Tue, 20 Jan 2026 13:56:48 +0100 Subject: [PATCH 22/97] Allows the model to use non parameter definition of BGC matrix sizes --- src/BIO/BIO_mem.f90 | 24 ++++++++++++++++-- src/General/DEFAULT_var_list.h | 14 +++++------ src/General/memory.f90 | 45 +++++++++++++++++++++++----------- src/General/ogstm.f90 | 3 +++ src/General/parameter.f90 | 4 +-- src/General/parini.f90 | 21 ++++++++++++++++ src/IO/DIA_mem.f90 | 2 ++ src/IO/fluxdump.f90 | 1 - 8 files changed, 88 insertions(+), 26 deletions(-) diff --git a/src/BIO/BIO_mem.f90 b/src/BIO/BIO_mem.f90 index 20596c7a..8a73eaae 100644 --- a/src/BIO/BIO_mem.f90 +++ b/src/BIO/BIO_mem.f90 @@ -28,12 +28,33 @@ MODULE BIO_mem double precision:: ice #ifdef key_trc_fabm class (type_fabm_model), pointer :: model_fabm + INTEGER :: jptra + INTEGER :: jptra_var + INTEGER :: jptra_flux + INTEGER :: jptra_dia_2d #endif !!!---------------------------------------------------------------------- CONTAINS +#ifdef key_trc_fabm + subroutine initialize_FABM() + ! Provide extents of the spatial domain (number of layers nz for a 1D column) + model_fabm => fabm_create_model() + call model_fabm%set_domain(jpk,jpj,jpi) + ! At this point (after the call to fabm_create_model), memory should be + ! allocated to hold the values of all size(model%interior_state_variables) state variables. + ! Where this memory resides and how it is laid out is typically host-specific. + ! Below, we assume all state variable values are combined in an array interior_state with + ! shape nx, ny, nz, size(model%interior_state_variables). + jptra_fabm=size(model_fabm%interior_state_variables) + ! jptra_var_fabm + ! jptra_flux_fabm + ! jptra_dia_2d_fabm + END subroutine initialize_FABM +#endif + subroutine myalloc_BIO() INTEGER :: err @@ -68,8 +89,7 @@ subroutine myalloc_BIO() ice=0 #ifdef key_trc_fabm ! Provide extents of the spatial domain (number of layers nz for a 1D column) - model_fabm => fabm_create_model() - call model_fabm%set_domain(jpk,jpj,jpi) + ! At this point (after the call to fabm_create_model), memory should be ! allocated to hold the values of all size(model%interior_state_variables) state variables. ! Where this memory resides and how it is laid out is typically host-specific. diff --git a/src/General/DEFAULT_var_list.h b/src/General/DEFAULT_var_list.h index 09d6cc6a..af88e1f3 100644 --- a/src/General/DEFAULT_var_list.h +++ b/src/General/DEFAULT_var_list.h @@ -1,12 +1,12 @@ - INTEGER, parameter :: jptra=1 + INTEGER :: jptra=1 - INTEGER, parameter :: jptra_var=1 + INTEGER :: jptra_var=1 - INTEGER, parameter :: jptra_flux=1 + INTEGER :: jptra_flux=1 - INTEGER, parameter :: jptra_dia=jptra_var + jptra_flux + INTEGER :: jptra_dia - INTEGER, parameter :: jptra_dia_2d=1 + INTEGER :: jptra_dia_2d=1 ! State variables indexes @@ -18,9 +18,9 @@ ! Flux indexes - integer, parameter:: ppDEFAULT3=3 + integer:: ppDEFAULT3=3 ! Variables 2d - integer, parameter:: ppDEFAULT4=4 + integer:: ppDEFAULT4=4 diff --git a/src/General/memory.f90 b/src/General/memory.f90 index d66d808d..37f35713 100644 --- a/src/General/memory.f90 +++ b/src/General/memory.f90 @@ -257,16 +257,16 @@ MODULE myalloc !! PASSIVE TRACER MODEL - CHARACTER(LEN=20) :: ctrcnm(jptra) - CHARACTER(LEN=12) :: ctrcun(jptra) - CHARACTER(LEN=20) :: dianm(jptra_dia) - CHARACTER(LEN=20) :: diaun(jptra_dia) - INTEGER :: diahf(jptra_dia) - INTEGER :: diaWR(jptra_dia) - CHARACTER(LEN=20) :: dianm_2d(jptra_dia_2d) - CHARACTER(LEN=20) :: diaun_2d(jptra_dia_2d) - INTEGER :: diahf_2d(jptra_dia_2d) - INTEGER :: diaWR_2d(jptra_dia_2d) + CHARACTER(LEN=20), allocatable, dimension(:) :: ctrcnm!(jptra) + CHARACTER(LEN=12), allocatable, dimension(:) :: ctrcun!(jptra) + CHARACTER(LEN=20), allocatable, dimension(:) :: dianm!(jptra_dia) + CHARACTER(LEN=20), allocatable, dimension(:) :: diaun!(jptra_dia) + INTEGER , allocatable, dimension(:) :: diahf!(jptra_dia) + INTEGER , allocatable, dimension(:) :: diaWR!(jptra_dia) + CHARACTER(LEN=20), allocatable, dimension(:) :: dianm_2d!(jptra_dia_2d) + CHARACTER(LEN=20), allocatable, dimension(:) :: diaun_2d!(jptra_dia_2d) + INTEGER , allocatable, dimension(:) :: diahf_2d!(jptra_dia_2d) + INTEGER , allocatable, dimension(:) :: diaWR_2d!(jptra_dia_2d) CHARACTER(LEN=17) :: COMMON_DATESTRING !physical tracers INTEGER :: jptra_phys, jptra_phys_2d @@ -280,11 +280,11 @@ MODULE myalloc - double precision :: ctrmax(jptra) + double precision, allocatable, dimension(:) :: ctrmax!(jptra) LOGICAL :: isCheckLOG LOGICAL :: save_bkp_group2 ! we can avoid to dump bkp of a lot of variables INTEGER :: jptra_high, jptra_dia_high, jptra_dia2d_high - INTEGER :: ctr_hf(jptra) + INTEGER, allocatable, dimension(:) :: ctr_hf!(jptra) INTEGER ave_freq_phys, freq_flux_dump @@ -798,12 +798,29 @@ subroutine alloc_tot() #ifdef Mem_Monitor mem_all=get_mem(err) - aux_mem #endif + END subroutine alloc_tot + + subroutine alloc_ctr() + allocate(ctrcnm(jptra)) + allocate(ctrcun(jptra)) - END subroutine alloc_tot + allocate(ctrmax(jptra)) + allocate(ctr_hf(jptra)) + + allocate(dianm(jptra_dia)) + allocate(diaun(jptra_dia)) + allocate(diahf(jptra_dia)) + + allocate(diaWR(jptra_dia)) + allocate(dianm_2d(jptra_dia_2d)) + allocate(diaun_2d(jptra_dia_2d)) + allocate(diahf_2d(jptra_dia_2d)) + allocate(diaWR_2d(jptra_dia_2d)) + END subroutine alloc_ctr - subroutine clean_memory() + subroutine clean_memory() ! myalloc (memory.f90) diff --git a/src/General/ogstm.f90 b/src/General/ogstm.f90 index 8d449819..6cf5a402 100644 --- a/src/General/ogstm.f90 +++ b/src/General/ogstm.f90 @@ -143,6 +143,9 @@ SUBROUTINE ogstm_initialize() call parlec ! read namelist.init call time_init + + call alloc_ctr + call trclec call opt_lec diff --git a/src/General/parameter.f90 b/src/General/parameter.f90 index d5e7ddfa..740b83ee 100644 --- a/src/General/parameter.f90 +++ b/src/General/parameter.f90 @@ -1,7 +1,5 @@ MODULE modul_param - !use mem - IMPLICIT NONE public @@ -58,6 +56,8 @@ MODULE modul_param #include "BFM_var_list.h" #elif key_trc_fabm + +! FABM dimensions are dynamically defined in parini #else diff --git a/src/General/parini.f90 b/src/General/parini.f90 index 26f09990..69584209 100644 --- a/src/General/parini.f90 +++ b/src/General/parini.f90 @@ -12,6 +12,7 @@ SUBROUTINE parini() USE myalloc USE modul_param + USE BIO_mem, ONLY: jptra, jptra_var, jptra_flux, jptra_dia_2d IMPLICIT NONE ! local declarations @@ -110,6 +111,26 @@ SUBROUTINE parini() deallocate(domdec) CLOSE(numnam) + +! initialize BGC dimensions +!! Passive tracers parameter + +#ifdef key_trc_bfm + +! BFM dimensions are included within the file BFM_var_list.h + +#elif key_trc_fabm + + call initialize_FABM() + +#else + +! Default dimensions are included within the file DEFAULT_var_list.h + +#endif + + jptra_dia=jptra_var + jptra_flux + CONTAINS ! ************************************************************** SUBROUTINE COUNTLINE(FILENAME,LINES) diff --git a/src/IO/DIA_mem.f90 b/src/IO/DIA_mem.f90 index e385f32e..2552553b 100644 --- a/src/IO/DIA_mem.f90 +++ b/src/IO/DIA_mem.f90 @@ -7,6 +7,7 @@ MODULE DIA_mem INTEGER FsizeGlo, Fsize, FsizeMax INTEGER(4), ALLOCATABLE, DIMENSION(:) :: INDFluxGlo, INDflxDUMP, INDflxDUMPglo, INDflxBuff, INDflxDUMPZERO INTEGER(4), allocatable, DIMENSION(:,:) :: flx_ridxt + INTEGER, ALLOCATABLE, DIMENSION(:) :: IDS!(jptra) double precision, ALLOCATABLE, DIMENSION(:,:,:) :: diaflx double precision, ALLOCATABLE, DIMENSION(:,:) :: MflxDumpGlo, diaflxBuff @@ -19,6 +20,7 @@ MODULE DIA_mem SUBROUTINE alloc_dia USE NETCDF IMPLICIT NONE + allocate(IDS(jptra)) INQUIRE(FILE='Fluxes.nc', EXIST=existFileFluxes) if (existFileFluxes) then diff --git a/src/IO/fluxdump.f90 b/src/IO/fluxdump.f90 index baaaec73..d13fb0f9 100644 --- a/src/IO/fluxdump.f90 +++ b/src/IO/fluxdump.f90 @@ -22,7 +22,6 @@ SUBROUTINE fluxdump(datemean, datefrom, dateend,FREQ_GROUP) integer s, nc,INDid integer nid, tid - INTEGER IDS(jptra) double precision Realcounter if (.not.existFileFluxes) RETURN From b579ffdccc8e765ff17a57f9c51a0fe8aecfb810 Mon Sep 17 00:00:00 2001 From: Paolo Lazzari Date: Wed, 21 Jan 2026 11:16:17 +0100 Subject: [PATCH 23/97] Retrive size of passive tracers matrixes from FABM --- src/BIO/BIO_mem.f90 | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/BIO/BIO_mem.f90 b/src/BIO/BIO_mem.f90 index 8a73eaae..2fed2f44 100644 --- a/src/BIO/BIO_mem.f90 +++ b/src/BIO/BIO_mem.f90 @@ -48,10 +48,14 @@ subroutine initialize_FABM() ! Where this memory resides and how it is laid out is typically host-specific. ! Below, we assume all state variable values are combined in an array interior_state with ! shape nx, ny, nz, size(model%interior_state_variables). - jptra_fabm=size(model_fabm%interior_state_variables) - ! jptra_var_fabm - ! jptra_flux_fabm - ! jptra_dia_2d_fabm + jptra=size(model_fabm%interior_state_variables) +! In FABM interior diagnostics includes already fluxes +! and they are counted in jptra_var therefore jptra_flux = 0 +! we keep definition of jptra_flux for back compatibility with older BFM +! code. + jptra_var=size(model_fabm%interior_diagnostic_variables) + jptra_flux=0 + jptra_dia_2d=size(model_fabm%horizontal_diagnostic_variables) END subroutine initialize_FABM #endif From b0858e6e55a83dbf74ffcb4880d6f967b431b374 Mon Sep 17 00:00:00 2001 From: Paolo Lazzari Date: Wed, 21 Jan 2026 12:21:02 +0100 Subject: [PATCH 24/97] Finalize to pass FABM internal variables names and units to OGSTM, namelist.passivetrc not used any more, diagnostic writing activations and frequency hard coded, need to be solved. --- src/BIO/BIO_mem.f90 | 5 +- src/BIO/trcbio_fabm.F90 | 146 +++++++++++++++++++------------------- src/BIO/trclec.f90 | 44 +++++++++++- src/General/memory.f90 | 2 +- src/General/parameter.f90 | 5 ++ src/General/parini.f90 | 2 +- src/IO/BC_mem.f90 | 2 +- 7 files changed, 123 insertions(+), 83 deletions(-) diff --git a/src/BIO/BIO_mem.f90 b/src/BIO/BIO_mem.f90 index 2fed2f44..353a39b2 100644 --- a/src/BIO/BIO_mem.f90 +++ b/src/BIO/BIO_mem.f90 @@ -28,10 +28,6 @@ MODULE BIO_mem double precision:: ice #ifdef key_trc_fabm class (type_fabm_model), pointer :: model_fabm - INTEGER :: jptra - INTEGER :: jptra_var - INTEGER :: jptra_flux - INTEGER :: jptra_dia_2d #endif @@ -55,6 +51,7 @@ subroutine initialize_FABM() ! code. jptra_var=size(model_fabm%interior_diagnostic_variables) jptra_flux=0 + jptra_dia=jptra_var+jptra_flux jptra_dia_2d=size(model_fabm%horizontal_diagnostic_variables) END subroutine initialize_FABM #endif diff --git a/src/BIO/trcbio_fabm.F90 b/src/BIO/trcbio_fabm.F90 index 7f66fc0a..1ed43f02 100644 --- a/src/BIO/trcbio_fabm.F90 +++ b/src/BIO/trcbio_fabm.F90 @@ -86,119 +86,119 @@ SUBROUTINE trcbio_fabm ! | BFM MODEL CALL| ! | --------------| - BIOparttime = MPI_WTIME() +! BIOparttime = MPI_WTIME() - surf_mask(:) = 0. - surf_mask(1) = 1. +! surf_mask(:) = 0. +! surf_mask(1) = 1. ! ------------------------------------------------- ! tra_idx = tra_matrix_gib(1) - jtrmax=jptra +! jtrmax=jptra ! ---------------- Fuori dai punti BFM - ogstm_sediPI=0. - tra_DIA = 0. - tra_DIA_2d = 0. ! da sistemare +! ogstm_sediPI=0. +! tra_DIA = 0. +! tra_DIA_2d = 0. ! da sistemare ! Initialization - a = 1.0 - er = 1.0 - er(:,10) = 8.1 +! a = 1.0 +! er = 1.0 +! er(:,10) = 8.1 #ifdef gdept1d ! er(:,11) is calculated outside the loop on ji,jj - do jk=1, jpk - correct_fact= 1.0D0 +! do jk=1, jpk +! correct_fact= 1.0D0 - if ( (gdept(jk) .GT. 1000.0D0 ) .AND. (gdept(jk) .LT. 2000.0D0 )) then - correct_fact= 0.25D0 - endif +! if ( (gdept(jk) .GT. 1000.0D0 ) .AND. (gdept(jk) .LT. 2000.0D0 )) then +! correct_fact= 0.25D0 +! endif - if (gdept(jk) .GE. 2000.0D0 ) then - correct_fact= 0.0D0 - endif +! if (gdept(jk) .GE. 2000.0D0 ) then +! correct_fact= 0.0D0 +! endif - er(jk,11) = correct_fact * ( gdept(jpk)-gdept(jk) ) /gdept(jpk) - enddo +! er(jk,11) = correct_fact * ( gdept(jpk)-gdept(jk) ) /gdept(jpk) +! enddo #endif - DO ji=1,jpi - DO jj=1,jpj - if (bfmmask(1,jj,ji) == 0) CYCLE - bottom = mbathy(jj,ji) +! DO ji=1,jpi +! DO jj=1,jpj +! if (bfmmask(1,jj,ji) == 0) CYCLE +! bottom = mbathy(jj,ji) - DO jtr=1, jtrmax +! DO jtr=1, jtrmax - a(1:bottom, jtr) = trn(1:bottom,jj,ji,jtr) ! current biogeochemical concentrations +! a(1:bottom, jtr) = trn(1:bottom,jj,ji,jtr) ! current biogeochemical concentrations - END DO +! END DO ! Environmental regulating factors (er,:) - er(1:bottom,1) = tn (1:bottom,jj,ji)! Temperature (Celsius) - er(1:bottom,2) = sn (1:bottom,jj,ji) ! Salinity PSU - er(1:bottom,3) = rho(1:bottom,jj,ji) ! Density Kg/m3 - er(1 ,4) = ice ! from 0 to 1 adimensional - er(1 ,5) = ogstm_co2(jj,ji) ! CO2 Mixing Ratios (ppm) 390 - er(1:bottom,6) = PAR(1:bottom,jj,ji,1) ! PAR for diatoms - er(1:bottom,7) = PAR(1:bottom,jj,ji,2) ! PAR for flagellates - er(1:bottom,8) = PAR(1:bottom,jj,ji,3) ! PAR for pico phytoplankton - er(1:bottom,9) = PAR(1:bottom,jj,ji,4) ! PAR for dinoflagellates - er(1:bottom,10) = PAR(1:bottom,jj,ji,5) ! total PAR for CDOM - er(1 ,11) = DAY_LENGTH(jj,ji) ! fotoperiod expressed in hours - er(1:bottom,12) = e3t(1:bottom,jj,ji) ! depth in meters of the given cell - er(1 ,13) = vatm(jj,ji) ! wind speed (m/s) - er(1:bottom,14) = ogstm_PH(1:bottom,jj,ji) ! 8.1 - er(1 ,15) = RMU(jj,ji) ! avg. cosine direct +! er(1:bottom,1) = tn (1:bottom,jj,ji)! Temperature (Celsius) +! er(1:bottom,2) = sn (1:bottom,jj,ji) ! Salinity PSU +! er(1:bottom,3) = rho(1:bottom,jj,ji) ! Density Kg/m3 +! er(1 ,4) = ice ! from 0 to 1 adimensional +! er(1 ,5) = ogstm_co2(jj,ji) ! CO2 Mixing Ratios (ppm) 390 +! er(1:bottom,6) = PAR(1:bottom,jj,ji,1) ! PAR for diatoms +! er(1:bottom,7) = PAR(1:bottom,jj,ji,2) ! PAR for flagellates +! er(1:bottom,8) = PAR(1:bottom,jj,ji,3) ! PAR for pico phytoplankton +! er(1:bottom,9) = PAR(1:bottom,jj,ji,4) ! PAR for dinoflagellates +! er(1:bottom,10) = PAR(1:bottom,jj,ji,5) ! total PAR for CDOM +! er(1 ,11) = DAY_LENGTH(jj,ji) ! fotoperiod expressed in hours +! er(1:bottom,12) = e3t(1:bottom,jj,ji) ! depth in meters of the given cell +! er(1 ,13) = vatm(jj,ji) ! wind speed (m/s) +! er(1:bottom,14) = ogstm_PH(1:bottom,jj,ji) ! 8.1 +! er(1 ,15) = RMU(jj,ji) ! avg. cosine direct #ifndef gdept1d - do jk=1,bottom - correct_fact= 1.0D0 - if ( (gdept(jk,jj,ji) .GT. 1000.0D0 ) .AND. (gdept(jk,jj,ji) .LT. 2000.0D0)) then - correct_fact= 0.25D0 - endif - - if (gdept(jk,jj,ji) .GE. 2000.0D0 ) then - correct_fact= 0.0D0 - endif - - er(jk,16) = correct_fact * ( gdept(jpk,jj,ji)-gdept(jk,jj,ji) ) /gdept(jpk,jj,ji) - enddo +! do jk=1,bottom +! correct_fact= 1.0D0 +! if ( (gdept(jk,jj,ji) .GT. 1000.0D0 ) .AND. (gdept(jk,jj,ji) .LT. 2000.0D0)) then +! correct_fact= 0.25D0 +! endif + +! if (gdept(jk,jj,ji) .GE. 2000.0D0 ) then +! correct_fact= 0.0D0 +! endif + +! er(jk,16) = correct_fact * ( gdept(jpk,jj,ji)-gdept(jk,jj,ji) ) /gdept(jpk,jj,ji) +! enddo #endif - call BFM1D_Input_EcologyDynamics(bottom,a,jtrmax,er) +! call BFM1D_Input_EcologyDynamics(bottom,a,jtrmax,er) - call BFM1D_reset() +! call BFM1D_reset() - call EcologyDynamics() +! call EcologyDynamics() - call BFM1D_Output_EcologyDynamics(b, c, d, d2) +! call BFM1D_Output_EcologyDynamics(b, c, d, d2) - DO jtr=1, jtrmax - tra(1:bottom,jj,ji,jtr) =tra(1:bottom,jj,ji,jtr) +b(jtr,1:bottom) ! trend - END DO +! DO jtr=1, jtrmax +! tra(1:bottom,jj,ji,jtr) =tra(1:bottom,jj,ji,jtr) +b(jtr,1:bottom) ! trend +! END DO - DO jtr=1,4 - ogstm_sediPI(1:bottom,jj,ji,jtr) = c(jtr,1:bottom) ! BFM output of sedimentation speed (m/d) - END DO +! DO jtr=1,4 +! ogstm_sediPI(1:bottom,jj,ji,jtr) = c(jtr,1:bottom) ! BFM output of sedimentation speed (m/d) +! END DO - DO jk = 1,bottom - DO jtr=1,jptra_dia - tra_DIA(jtr, jk ,jj,ji) = d(jtr,jk) ! diagnostic - END DO - ENDDO +! DO jk = 1,bottom +! DO jtr=1,jptra_dia +! tra_DIA(jtr, jk ,jj,ji) = d(jtr,jk) ! diagnostic +! END DO +! ENDDO - tra_DIA_2d(:,jj,ji) = d2(:) ! diagnostic +! tra_DIA_2d(:,jj,ji) = d2(:) ! diagnostic - ogstm_PH(1:bottom,jj,ji) = d(pppH,1:bottom) ! Follows solver guess, put 8.0 if pppH is not defined +! ogstm_PH(1:bottom,jj,ji) = d(pppH,1:bottom) ! Follows solver guess, put 8.0 if pppH is not defined - END DO - END DO +! END DO +! END DO ! ---------------------------------------------------------------------- ! BEGIN BC_REFACTORING SECTION diff --git a/src/BIO/trclec.f90 b/src/BIO/trclec.f90 index d6af01f4..33cea9cf 100644 --- a/src/BIO/trclec.f90 +++ b/src/BIO/trclec.f90 @@ -19,24 +19,62 @@ SUBROUTINE trclec USE myalloc + USE BIO_mem +#ifdef key_trc_fabm + USE fabm +#endif IMPLICIT NONE !---------------------------------------------------------------------- ! local declarations ! ================== - INTEGER ji + INTEGER ::i, ji !---------------------------------------------------------------------- ! statement functions ! =================== !passive tracers +#ifdef key_trc_bfm namelist /NATTRC/ ctrcnm, ctrcun, ctrmax, ctr_hf namelist /NATTRC_DIAG/ dianm, diaun, diahf, diaWR namelist /NATTRC_DIAG_2d/ dianm_2d, diaun_2d, diahf_2d ,diaWR_2d +#elif key_trc_fabm + + do i = 1, size(model_fabm%interior_state_variables) + ctrcnm(i) = model_fabm%interior_state_variables(i)%name + ctrcun(i) = model_fabm%interior_state_variables(i)%units + end do + do i = 1, size(model_fabm%interior_diagnostic_variables) + dianm(i) = model_fabm%interior_diagnostic_variables(i)%name + diaun(i) = model_fabm%interior_diagnostic_variables(i)%units + end do + do i = 1, size(model_fabm%horizontal_diagnostic_variables) + dianm_2d(i) = model_fabm%horizontal_diagnostic_variables(i)%name + diaun_2d(i) = model_fabm%horizontal_diagnostic_variables(i)%units + end do + ctrmax(:) = 100000.0 + ctr_hf(:) = 0 + diahf(:) = 0 + diaWR(:) = 1 + diahf_2d(:) = 0 + diaWR_2d(:) = 1 + +! namelist /NATTRC/ ctrmax, ctr_hf +! namelist /NATTRC_DIAG/ diahf, diaWR +! namelist /NATTRC_DIAG_2d/ diahf_2d ,diaWR_2d + +#else + + namelist /NATTRC/ ctrcnm, ctrcun, ctrmax, ctr_hf + namelist /NATTRC_DIAG/ dianm, diaun, diahf, diaWR + namelist /NATTRC_DIAG_2d/ dianm_2d, diaun_2d, diahf_2d ,diaWR_2d + +#endif + !physics tracers namelist /PHYS_num/ jptra_phys, jptra_phys_2d @@ -72,7 +110,7 @@ SUBROUTINE trclec ENDIF !----------------------- READING PASSIVE TRACERS NAMELIST - +#ifndef key_trc_fabm OPEN(unit=numnat, file='namelist.passivetrc', status= 'OLD') !'FORMATTED', 'SEQUENTIAL') ! ***** namelist nattrc STATE VARIABLES: @@ -94,7 +132,7 @@ SUBROUTINE trclec ! ***** CLOSE(numnat) - +#endif !---------------------- READING PHYSICS TRACERS NAMELIST OPEN(unit=numphys, file='namelist.phys', status= 'OLD') !'FORMATTED', 'SEQUENTIAL') diff --git a/src/General/memory.f90 b/src/General/memory.f90 index 37f35713..ec9306a1 100644 --- a/src/General/memory.f90 +++ b/src/General/memory.f90 @@ -674,7 +674,7 @@ subroutine alloc_tot() e3wdta = huge(e3wdta(1,1,1,1)) !!---------------------------------------------------------------------- - + allocate(trn(jpk,jpj,jpi,jptra)) trn = huge(trn(1,1,1,1)) diff --git a/src/General/parameter.f90 b/src/General/parameter.f90 index 740b83ee..0a540cb8 100644 --- a/src/General/parameter.f90 +++ b/src/General/parameter.f90 @@ -58,6 +58,11 @@ MODULE modul_param #elif key_trc_fabm ! FABM dimensions are dynamically defined in parini + INTEGER :: jptra + INTEGER :: jptra_var + INTEGER :: jptra_flux + INTEGER :: jptra_dia + INTEGER :: jptra_dia_2d #else diff --git a/src/General/parini.f90 b/src/General/parini.f90 index 69584209..33002400 100644 --- a/src/General/parini.f90 +++ b/src/General/parini.f90 @@ -12,7 +12,7 @@ SUBROUTINE parini() USE myalloc USE modul_param - USE BIO_mem, ONLY: jptra, jptra_var, jptra_flux, jptra_dia_2d + USE BIO_mem, ONLY: jptra, jptra_var, jptra_flux, jptra_dia_2d, initialize_fabm IMPLICIT NONE ! local declarations diff --git a/src/IO/BC_mem.f90 b/src/IO/BC_mem.f90 index abaee5ba..2a254076 100644 --- a/src/IO/BC_mem.f90 +++ b/src/IO/BC_mem.f90 @@ -170,7 +170,7 @@ SUBROUTINE alloc_DTATRC #elif key_trc_fabm - jn_atm = ? + jn_atm = 2 #else From 72f7e8e84b1d6afdf1c7d22aea9139f66f581baa Mon Sep 17 00:00:00 2001 From: Paolo Lazzari Date: Wed, 21 Jan 2026 12:24:25 +0100 Subject: [PATCH 25/97] set no BGC as Default configuration --- GeneralCmake.cmake | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/GeneralCmake.cmake b/GeneralCmake.cmake index 4a662419..1a61ec69 100644 --- a/GeneralCmake.cmake +++ b/GeneralCmake.cmake @@ -9,8 +9,8 @@ enable_language(Fortran C) set (NETCDF_F90 "YES") find_package(MPI REQUIRED) find_package(NetCDF REQUIRED) -find_package(BFM REQUIRED) -find_package(FABM REQUIRED) +#find_package(BFM REQUIRED) +#find_package(FABM REQUIRED) find_package(BIOPTIMOD_3STREAM REQUIRED) find_package(OASIM_ATM) @@ -53,8 +53,8 @@ else () endif () #include -include_directories(${BFM_INCLUDES}) -include_directories(${FABM_INCLUDES}) +#include_directories(${BFM_INCLUDES}) +#include_directories(${FABM_INCLUDES}) include_directories(${BIOPTIMOD_3STREAM_INCLUDES}) include_directories(${OASIM_ATM_INCLUDES}) include_directories(${NETCDF_INCLUDES_C}) From 4455762fdd484da691546b90fcb281c5b8eaa16a Mon Sep 17 00:00:00 2001 From: Marco-Puglia Date: Thu, 22 Jan 2026 11:35:35 +0100 Subject: [PATCH 26/97] Fix BFM and DEFAULT compilation in parini.f90 --- src/General/parini.f90 | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/src/General/parini.f90 b/src/General/parini.f90 index 33002400..606abb7e 100644 --- a/src/General/parini.f90 +++ b/src/General/parini.f90 @@ -12,7 +12,13 @@ SUBROUTINE parini() USE myalloc USE modul_param - USE BIO_mem, ONLY: jptra, jptra_var, jptra_flux, jptra_dia_2d, initialize_fabm + +#ifdef key_trc_fabm + USE BIO_mem, ONLY: jptra, jptra_var, jptra_flux, jptra_dia_2d, initialize_FABM +#else + USE BIO_mem, ONLY: jptra, jptra_var, jptra_flux, jptra_dia_2d +#endif + IMPLICIT NONE ! local declarations @@ -122,14 +128,15 @@ SUBROUTINE parini() #elif key_trc_fabm call initialize_FABM() - + jptra_dia=jptra_var + jptra_flux #else ! Default dimensions are included within the file DEFAULT_var_list.h + jptra_dia=jptra_var + jptra_flux #endif - jptra_dia=jptra_var + jptra_flux + CONTAINS ! ************************************************************** From 665fbbccee32db1098aa707de391fc9f1688ff64 Mon Sep 17 00:00:00 2001 From: Paolo Lazzari Date: Mon, 26 Jan 2026 12:35:15 +0100 Subject: [PATCH 27/97] copy all the namelist need .optics and .phys when using fabm BGC_TYPE --- testcase/KB/INIT_NWM_KB_FABM/INIT.B1_c | 43 +++++++++++++++++++++ testcase/KB/INIT_NWM_KB_FABM/INIT.B1_n | 43 +++++++++++++++++++++ testcase/KB/INIT_NWM_KB_FABM/INIT.B1_p | 43 +++++++++++++++++++++ testcase/KB/INIT_NWM_KB_FABM/INIT.N1_p | 43 +++++++++++++++++++++ testcase/KB/INIT_NWM_KB_FABM/INIT.N3_n | 43 +++++++++++++++++++++ testcase/KB/INIT_NWM_KB_FABM/INIT.N4_n | 43 +++++++++++++++++++++ testcase/KB/INIT_NWM_KB_FABM/INIT.N5_s | 43 +++++++++++++++++++++ testcase/KB/INIT_NWM_KB_FABM/INIT.N6_r | 43 +++++++++++++++++++++ testcase/KB/INIT_NWM_KB_FABM/INIT.O2_o | 43 +++++++++++++++++++++ testcase/KB/INIT_NWM_KB_FABM/INIT.O3_c | 43 +++++++++++++++++++++ testcase/KB/INIT_NWM_KB_FABM/INIT.O3h_h | 43 +++++++++++++++++++++ testcase/KB/INIT_NWM_KB_FABM/INIT.O4_n | 43 +++++++++++++++++++++ testcase/KB/INIT_NWM_KB_FABM/INIT.O5_c | 43 +++++++++++++++++++++ testcase/KB/INIT_NWM_KB_FABM/INIT.P1_Chl | 43 +++++++++++++++++++++ testcase/KB/INIT_NWM_KB_FABM/INIT.P1_c | 43 +++++++++++++++++++++ testcase/KB/INIT_NWM_KB_FABM/INIT.P1_n | 43 +++++++++++++++++++++ testcase/KB/INIT_NWM_KB_FABM/INIT.P1_p | 43 +++++++++++++++++++++ testcase/KB/INIT_NWM_KB_FABM/INIT.P1_s | 43 +++++++++++++++++++++ testcase/KB/INIT_NWM_KB_FABM/INIT.P2_Chl | 43 +++++++++++++++++++++ testcase/KB/INIT_NWM_KB_FABM/INIT.P2_c | 43 +++++++++++++++++++++ testcase/KB/INIT_NWM_KB_FABM/INIT.P2_n | 43 +++++++++++++++++++++ testcase/KB/INIT_NWM_KB_FABM/INIT.P2_p | 43 +++++++++++++++++++++ testcase/KB/INIT_NWM_KB_FABM/INIT.P3_Chl | 43 +++++++++++++++++++++ testcase/KB/INIT_NWM_KB_FABM/INIT.P3_c | 43 +++++++++++++++++++++ testcase/KB/INIT_NWM_KB_FABM/INIT.P3_n | 43 +++++++++++++++++++++ testcase/KB/INIT_NWM_KB_FABM/INIT.P3_p | 43 +++++++++++++++++++++ testcase/KB/INIT_NWM_KB_FABM/INIT.P4_Chl | 43 +++++++++++++++++++++ testcase/KB/INIT_NWM_KB_FABM/INIT.P4_c | 43 +++++++++++++++++++++ testcase/KB/INIT_NWM_KB_FABM/INIT.P4_n | 43 +++++++++++++++++++++ testcase/KB/INIT_NWM_KB_FABM/INIT.P4_p | 43 +++++++++++++++++++++ testcase/KB/INIT_NWM_KB_FABM/INIT.R1_c | 43 +++++++++++++++++++++ testcase/KB/INIT_NWM_KB_FABM/INIT.R1_n | 43 +++++++++++++++++++++ testcase/KB/INIT_NWM_KB_FABM/INIT.R1_p | 43 +++++++++++++++++++++ testcase/KB/INIT_NWM_KB_FABM/INIT.R1_s | 43 +++++++++++++++++++++ testcase/KB/INIT_NWM_KB_FABM/INIT.R2_c | 43 +++++++++++++++++++++ testcase/KB/INIT_NWM_KB_FABM/INIT.R3_c | 43 +++++++++++++++++++++ testcase/KB/INIT_NWM_KB_FABM/INIT.R6_c | 43 +++++++++++++++++++++ testcase/KB/INIT_NWM_KB_FABM/INIT.R6_n | 43 +++++++++++++++++++++ testcase/KB/INIT_NWM_KB_FABM/INIT.R6_p | 43 +++++++++++++++++++++ testcase/KB/INIT_NWM_KB_FABM/INIT.R6_s | 43 +++++++++++++++++++++ testcase/KB/INIT_NWM_KB_FABM/INIT.R8_c | 43 +++++++++++++++++++++ testcase/KB/INIT_NWM_KB_FABM/INIT.R8_n | 43 +++++++++++++++++++++ testcase/KB/INIT_NWM_KB_FABM/INIT.R8_p | 43 +++++++++++++++++++++ testcase/KB/INIT_NWM_KB_FABM/INIT.R8_s | 43 +++++++++++++++++++++ testcase/KB/INIT_NWM_KB_FABM/INIT.X1_c | 43 +++++++++++++++++++++ testcase/KB/INIT_NWM_KB_FABM/INIT.X2_c | 43 +++++++++++++++++++++ testcase/KB/INIT_NWM_KB_FABM/INIT.X3_c | 43 +++++++++++++++++++++ testcase/KB/INIT_NWM_KB_FABM/INIT.Z3_c | 43 +++++++++++++++++++++ testcase/KB/INIT_NWM_KB_FABM/INIT.Z3_n | 43 +++++++++++++++++++++ testcase/KB/INIT_NWM_KB_FABM/INIT.Z3_p | 43 +++++++++++++++++++++ testcase/KB/INIT_NWM_KB_FABM/INIT.Z4_c | 43 +++++++++++++++++++++ testcase/KB/INIT_NWM_KB_FABM/INIT.Z4_n | 43 +++++++++++++++++++++ testcase/KB/INIT_NWM_KB_FABM/INIT.Z4_p | 43 +++++++++++++++++++++ testcase/KB/INIT_NWM_KB_FABM/INIT.Z5_c | 43 +++++++++++++++++++++ testcase/KB/INIT_NWM_KB_FABM/INIT.Z5_n | 43 +++++++++++++++++++++ testcase/KB/INIT_NWM_KB_FABM/INIT.Z5_p | 43 +++++++++++++++++++++ testcase/KB/INIT_NWM_KB_FABM/INIT.Z6_c | 43 +++++++++++++++++++++ testcase/KB/INIT_NWM_KB_FABM/INIT.Z6_n | 43 +++++++++++++++++++++ testcase/KB/INIT_NWM_KB_FABM/INIT.Z6_p | 43 +++++++++++++++++++++ testcase/KB/INIT_NWM_KB_FABM/INIT.depth | 43 +++++++++++++++++++++ testcase/Main_create_TEST.py | 2 + testcase/create_init_nc.py | 48 ++++++++++++++++++------ testcase/deploy_code.py | 7 ++++ 63 files changed, 2625 insertions(+), 12 deletions(-) create mode 100644 testcase/KB/INIT_NWM_KB_FABM/INIT.B1_c create mode 100644 testcase/KB/INIT_NWM_KB_FABM/INIT.B1_n create mode 100644 testcase/KB/INIT_NWM_KB_FABM/INIT.B1_p create mode 100644 testcase/KB/INIT_NWM_KB_FABM/INIT.N1_p create mode 100644 testcase/KB/INIT_NWM_KB_FABM/INIT.N3_n create mode 100644 testcase/KB/INIT_NWM_KB_FABM/INIT.N4_n create mode 100644 testcase/KB/INIT_NWM_KB_FABM/INIT.N5_s create mode 100644 testcase/KB/INIT_NWM_KB_FABM/INIT.N6_r create mode 100644 testcase/KB/INIT_NWM_KB_FABM/INIT.O2_o create mode 100644 testcase/KB/INIT_NWM_KB_FABM/INIT.O3_c create mode 100644 testcase/KB/INIT_NWM_KB_FABM/INIT.O3h_h create mode 100644 testcase/KB/INIT_NWM_KB_FABM/INIT.O4_n create mode 100644 testcase/KB/INIT_NWM_KB_FABM/INIT.O5_c create mode 100644 testcase/KB/INIT_NWM_KB_FABM/INIT.P1_Chl create mode 100644 testcase/KB/INIT_NWM_KB_FABM/INIT.P1_c create mode 100644 testcase/KB/INIT_NWM_KB_FABM/INIT.P1_n create mode 100644 testcase/KB/INIT_NWM_KB_FABM/INIT.P1_p create mode 100644 testcase/KB/INIT_NWM_KB_FABM/INIT.P1_s create mode 100644 testcase/KB/INIT_NWM_KB_FABM/INIT.P2_Chl create mode 100644 testcase/KB/INIT_NWM_KB_FABM/INIT.P2_c create mode 100644 testcase/KB/INIT_NWM_KB_FABM/INIT.P2_n create mode 100644 testcase/KB/INIT_NWM_KB_FABM/INIT.P2_p create mode 100644 testcase/KB/INIT_NWM_KB_FABM/INIT.P3_Chl create mode 100644 testcase/KB/INIT_NWM_KB_FABM/INIT.P3_c create mode 100644 testcase/KB/INIT_NWM_KB_FABM/INIT.P3_n create mode 100644 testcase/KB/INIT_NWM_KB_FABM/INIT.P3_p create mode 100644 testcase/KB/INIT_NWM_KB_FABM/INIT.P4_Chl create mode 100644 testcase/KB/INIT_NWM_KB_FABM/INIT.P4_c create mode 100644 testcase/KB/INIT_NWM_KB_FABM/INIT.P4_n create mode 100644 testcase/KB/INIT_NWM_KB_FABM/INIT.P4_p create mode 100644 testcase/KB/INIT_NWM_KB_FABM/INIT.R1_c create mode 100644 testcase/KB/INIT_NWM_KB_FABM/INIT.R1_n create mode 100644 testcase/KB/INIT_NWM_KB_FABM/INIT.R1_p create mode 100644 testcase/KB/INIT_NWM_KB_FABM/INIT.R1_s create mode 100644 testcase/KB/INIT_NWM_KB_FABM/INIT.R2_c create mode 100644 testcase/KB/INIT_NWM_KB_FABM/INIT.R3_c create mode 100644 testcase/KB/INIT_NWM_KB_FABM/INIT.R6_c create mode 100644 testcase/KB/INIT_NWM_KB_FABM/INIT.R6_n create mode 100644 testcase/KB/INIT_NWM_KB_FABM/INIT.R6_p create mode 100644 testcase/KB/INIT_NWM_KB_FABM/INIT.R6_s create mode 100644 testcase/KB/INIT_NWM_KB_FABM/INIT.R8_c create mode 100644 testcase/KB/INIT_NWM_KB_FABM/INIT.R8_n create mode 100644 testcase/KB/INIT_NWM_KB_FABM/INIT.R8_p create mode 100644 testcase/KB/INIT_NWM_KB_FABM/INIT.R8_s create mode 100644 testcase/KB/INIT_NWM_KB_FABM/INIT.X1_c create mode 100644 testcase/KB/INIT_NWM_KB_FABM/INIT.X2_c create mode 100644 testcase/KB/INIT_NWM_KB_FABM/INIT.X3_c create mode 100644 testcase/KB/INIT_NWM_KB_FABM/INIT.Z3_c create mode 100644 testcase/KB/INIT_NWM_KB_FABM/INIT.Z3_n create mode 100644 testcase/KB/INIT_NWM_KB_FABM/INIT.Z3_p create mode 100644 testcase/KB/INIT_NWM_KB_FABM/INIT.Z4_c create mode 100644 testcase/KB/INIT_NWM_KB_FABM/INIT.Z4_n create mode 100644 testcase/KB/INIT_NWM_KB_FABM/INIT.Z4_p create mode 100644 testcase/KB/INIT_NWM_KB_FABM/INIT.Z5_c create mode 100644 testcase/KB/INIT_NWM_KB_FABM/INIT.Z5_n create mode 100644 testcase/KB/INIT_NWM_KB_FABM/INIT.Z5_p create mode 100644 testcase/KB/INIT_NWM_KB_FABM/INIT.Z6_c create mode 100644 testcase/KB/INIT_NWM_KB_FABM/INIT.Z6_n create mode 100644 testcase/KB/INIT_NWM_KB_FABM/INIT.Z6_p create mode 100644 testcase/KB/INIT_NWM_KB_FABM/INIT.depth diff --git a/testcase/KB/INIT_NWM_KB_FABM/INIT.B1_c b/testcase/KB/INIT_NWM_KB_FABM/INIT.B1_c new file mode 100644 index 00000000..b938c94d --- /dev/null +++ b/testcase/KB/INIT_NWM_KB_FABM/INIT.B1_c @@ -0,0 +1,43 @@ +8.00000000000000000000 +8.00000000000000000000 +8.00000000000000000000 +8.00000000000000000000 +8.00000000000000000000 +8.00000000000000000000 +8.00000000000000000000 +8.00000000000000000000 +8.00000000000000000000 +8.00000000000000000000 +8.00000000000000000000 +8.00000000000000000000 +8.00000000000000000000 +0.00000000080000000000 +0.00000000080000000000 +0.00000000080000000000 +0.00000000080000000000 +0.00000000080000000000 +0.00000000080000000000 +0.00000000080000000000 +0.00000000080000000000 +0.00000000080000000000 +0.00000000080000000000 +0.00000000080000000000 +0.00000000080000000000 +0.00000000080000000000 +0.00000000080000000000 +0.00000000080000000000 +0.00000000080000000000 +0.00000000080000000000 +0.00000000080000000000 +0.00000000080000000000 +0.00000000080000000000 +0.00000000080000000000 +0.00000000080000000000 +0.00000000080000000000 +0.00000000080000000000 +0.00000000080000000000 +0.00000000080000000000 +0.00000000080000000000 +0.00000000080000000000 +0.00000000080000000000 +0.00000000080000000000 diff --git a/testcase/KB/INIT_NWM_KB_FABM/INIT.B1_n b/testcase/KB/INIT_NWM_KB_FABM/INIT.B1_n new file mode 100644 index 00000000..f767ff59 --- /dev/null +++ b/testcase/KB/INIT_NWM_KB_FABM/INIT.B1_n @@ -0,0 +1,43 @@ +0.06800000000000000000 +0.06800000000000000000 +0.06800000000000000000 +0.06800000000000000000 +0.06800000000000000000 +0.06800000000000000000 +0.06800000000000000000 +0.06800000000000000000 +0.06800000000000000000 +0.06800000000000000000 +0.06800000000000000000 +0.06800000000000000000 +0.06800000000000000000 +0.00000000000680000000 +0.00000000000680000000 +0.00000000000680000000 +0.00000000000680000000 +0.00000000000680000000 +0.00000000000680000000 +0.00000000000680000000 +0.00000000000680000000 +0.00000000000680000000 +0.00000000000680000000 +0.00000000000680000000 +0.00000000000680000000 +0.00000000000680000000 +0.00000000000680000000 +0.00000000000680000000 +0.00000000000680000000 +0.00000000000680000000 +0.00000000000680000000 +0.00000000000680000000 +0.00000000000680000000 +0.00000000000680000000 +0.00000000000680000000 +0.00000000000680000000 +0.00000000000680000000 +0.00000000000680000000 +0.00000000000680000000 +0.00000000000680000000 +0.00000000000680000000 +0.00000000000680000000 +0.00000000000680000000 diff --git a/testcase/KB/INIT_NWM_KB_FABM/INIT.B1_p b/testcase/KB/INIT_NWM_KB_FABM/INIT.B1_p new file mode 100644 index 00000000..5477561f --- /dev/null +++ b/testcase/KB/INIT_NWM_KB_FABM/INIT.B1_p @@ -0,0 +1,43 @@ +0.00760000000000000000 +0.00760000000000000000 +0.00760000000000000000 +0.00760000000000000000 +0.00760000000000000000 +0.00760000000000000000 +0.00760000000000000000 +0.00760000000000000000 +0.00760000000000000000 +0.00760000000000000000 +0.00760000000000000000 +0.00760000000000000000 +0.00760000000000000000 +0.00000000000076000000 +0.00000000000076000000 +0.00000000000076000000 +0.00000000000076000000 +0.00000000000076000000 +0.00000000000076000000 +0.00000000000076000000 +0.00000000000076000000 +0.00000000000076000000 +0.00000000000076000000 +0.00000000000076000000 +0.00000000000076000000 +0.00000000000076000000 +0.00000000000076000000 +0.00000000000076000000 +0.00000000000076000000 +0.00000000000076000000 +0.00000000000076000000 +0.00000000000076000000 +0.00000000000076000000 +0.00000000000076000000 +0.00000000000076000000 +0.00000000000076000000 +0.00000000000076000000 +0.00000000000076000000 +0.00000000000076000000 +0.00000000000076000000 +0.00000000000076000000 +0.00000000000076000000 +0.00000000000076000000 diff --git a/testcase/KB/INIT_NWM_KB_FABM/INIT.N1_p b/testcase/KB/INIT_NWM_KB_FABM/INIT.N1_p new file mode 100644 index 00000000..5d81fb9b --- /dev/null +++ b/testcase/KB/INIT_NWM_KB_FABM/INIT.N1_p @@ -0,0 +1,43 @@ +0.16523400000000000000 +0.16523400000000000000 +0.15462200000000000000 +0.13322500000000000000 +0.12346000000000000000 +0.12719600000000000000 +0.14211400000000000000 +0.16772700000000000000 +0.19223900000000000000 +0.22108400000000000000 +0.25492200000000000000 +0.29000300000000000000 +0.32170100000000000000 +0.34633600000000000000 +0.36539000000000000000 +0.37916800000000000000 +0.38161300000000000000 +0.38704300000000000000 +0.39478200000000000000 +0.40147600000000000000 +0.40243800000000000000 +0.40350200000000000000 +0.41747600000000000000 +0.43347400000000000000 +0.43380600000000000000 +0.42563500000000000000 +0.42364400000000000000 +0.42785100000000000000 +0.42984100000000000000 +0.42951700000000000000 +0.42441200000000000000 +0.41613200000000000000 +0.40767300000000000000 +0.40040500000000000000 +0.40341000000000000000 +0.40502200000000000000 +0.40502200000000000000 +0.40502200000000000000 +0.40502200000000000000 +0.40502200000000000000 +0.40502200000000000000 +0.40502200000000000000 +0.40502200000000000000 diff --git a/testcase/KB/INIT_NWM_KB_FABM/INIT.N3_n b/testcase/KB/INIT_NWM_KB_FABM/INIT.N3_n new file mode 100644 index 00000000..c39b16a5 --- /dev/null +++ b/testcase/KB/INIT_NWM_KB_FABM/INIT.N3_n @@ -0,0 +1,43 @@ +0.32068100000000000000 +0.32068100000000000000 +0.73760500000000000000 +1.34809800000000000000 +2.00095100000000000000 +2.70580200000000000000 +3.80775400000000000000 +5.22682700000000000000 +6.12715700000000000000 +6.51180400000000000000 +6.76125900000000000000 +7.05128800000000000000 +7.35078000000000000000 +7.64837600000000000000 +8.04166600000000000000 +8.22991500000000000000 +7.99070900000000000000 +7.91138400000000000000 +8.00636400000000000000 +8.09380100000000000000 +8.12630200000000000000 +8.16224600000000000000 +8.28216100000000000000 +8.41771900000000000000 +8.41925400000000000000 +8.34799800000000000000 +8.24645100000000000000 +8.11482700000000000000 +8.03975700000000000000 +8.02381400000000000000 +7.99218000000000000000 +7.94996800000000000000 +7.53459200000000000000 +7.09168700000000000000 +7.09168700000000000000 +7.09168700000000000000 +7.09168700000000000000 +7.09168700000000000000 +7.09168700000000000000 +7.09168700000000000000 +7.09168700000000000000 +7.09168700000000000000 +7.09168700000000000000 diff --git a/testcase/KB/INIT_NWM_KB_FABM/INIT.N4_n b/testcase/KB/INIT_NWM_KB_FABM/INIT.N4_n new file mode 100644 index 00000000..e97c5017 --- /dev/null +++ b/testcase/KB/INIT_NWM_KB_FABM/INIT.N4_n @@ -0,0 +1,43 @@ +0.01000000000000000000 +0.01000000000000000000 +0.01000000000000000000 +0.01000000000000000000 +0.01000000000000000000 +0.01000000000000000000 +0.01000000000000000000 +0.01000000000000000000 +0.01000000000000000000 +0.01000000000000000000 +0.01000000000000000000 +0.01000000000000000000 +0.01000000000000000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 diff --git a/testcase/KB/INIT_NWM_KB_FABM/INIT.N5_s b/testcase/KB/INIT_NWM_KB_FABM/INIT.N5_s new file mode 100644 index 00000000..46283422 --- /dev/null +++ b/testcase/KB/INIT_NWM_KB_FABM/INIT.N5_s @@ -0,0 +1,43 @@ +1.69844400000000000000 +1.69844400000000000000 +1.49924400000000000000 +1.45740100000000000000 +1.54467400000000000000 +1.78258600000000000000 +2.06839600000000000000 +2.39814100000000000000 +2.78805600000000000000 +3.19409000000000000000 +3.63097100000000000000 +4.08502600000000000000 +4.60952500000000000000 +5.20964400000000000000 +5.38309400000000000000 +5.71064300000000000000 +6.33691000000000000000 +6.75696000000000000000 +6.90878300000000000000 +7.12213000000000000000 +7.46151900000000000000 +7.83687100000000000000 +7.84077300000000000000 +7.82128400000000000000 +7.86414700000000000000 +7.94237300000000000000 +8.08236500000000000000 +8.28387400000000000000 +8.25326900000000000000 +7.98183100000000000000 +7.76668300000000000000 +7.58593400000000000000 +8.13348500000000000000 +8.76179200000000000000 +8.76179200000000000000 +8.76179200000000000000 +8.76179200000000000000 +8.76179200000000000000 +8.76179200000000000000 +8.76179200000000000000 +8.76179200000000000000 +8.76179200000000000000 +8.76179200000000000000 diff --git a/testcase/KB/INIT_NWM_KB_FABM/INIT.N6_r b/testcase/KB/INIT_NWM_KB_FABM/INIT.N6_r new file mode 100644 index 00000000..051c41cc --- /dev/null +++ b/testcase/KB/INIT_NWM_KB_FABM/INIT.N6_r @@ -0,0 +1,43 @@ +1.00000000000000000000 +1.00000000000000000000 +1.00000000000000000000 +1.00000000000000000000 +1.00000000000000000000 +1.00000000000000000000 +1.00000000000000000000 +1.00000000000000000000 +1.00000000000000000000 +1.00000000000000000000 +1.00000000000000000000 +1.00000000000000000000 +1.00000000000000000000 +0.00000000010000000000 +0.00000000010000000000 +0.00000000010000000000 +0.00000000010000000000 +0.00000000010000000000 +0.00000000010000000000 +0.00000000010000000000 +0.00000000010000000000 +0.00000000010000000000 +0.00000000010000000000 +0.00000000010000000000 +0.00000000010000000000 +0.00000000010000000000 +0.00000000010000000000 +0.00000000010000000000 +0.00000000010000000000 +0.00000000010000000000 +0.00000000010000000000 +0.00000000010000000000 +0.00000000010000000000 +0.00000000010000000000 +0.00000000010000000000 +0.00000000010000000000 +0.00000000010000000000 +0.00000000010000000000 +0.00000000010000000000 +0.00000000010000000000 +0.00000000010000000000 +0.00000000010000000000 +0.00000000010000000000 diff --git a/testcase/KB/INIT_NWM_KB_FABM/INIT.O2_o b/testcase/KB/INIT_NWM_KB_FABM/INIT.O2_o new file mode 100644 index 00000000..f9c93e6d --- /dev/null +++ b/testcase/KB/INIT_NWM_KB_FABM/INIT.O2_o @@ -0,0 +1,43 @@ +240.00020500000000000000 +240.00020500000000000000 +241.07563500000000000000 +245.34695400000000000000 +246.39085500000000000000 +243.68261900000000000000 +239.27435200000000000000 +233.48347300000000000000 +227.81100100000000000000 +224.31329000000000000000 +221.18463300000000000000 +215.81968600000000000000 +209.63923900000000000000 +203.03697800000000000000 +198.63600800000000000000 +194.73255500000000000000 +192.04497600000000000000 +190.79438400000000000000 +191.18387200000000000000 +191.26327500000000000000 +190.30606900000000000000 +189.24743700000000000000 +190.86546000000000000000 +192.79315700000000000000 +196.08439400000000000000 +200.22998400000000000000 +202.80832500000000000000 +203.80896300000000000000 +205.28080600000000000000 +207.23390300000000000000 +207.98633200000000000000 +207.96360000000000000000 +207.01531400000000000000 +205.91890300000000000000 +205.31800200000000000000 +204.99563000000000000000 +204.99563000000000000000 +204.99563000000000000000 +204.99563000000000000000 +204.99563000000000000000 +204.99563000000000000000 +204.99563000000000000000 +204.99563000000000000000 diff --git a/testcase/KB/INIT_NWM_KB_FABM/INIT.O3_c b/testcase/KB/INIT_NWM_KB_FABM/INIT.O3_c new file mode 100644 index 00000000..bd35e7d7 --- /dev/null +++ b/testcase/KB/INIT_NWM_KB_FABM/INIT.O3_c @@ -0,0 +1,43 @@ +2.66E+04 +2.66E+04 +2.66E+04 +2.67E+04 +2.67E+04 +2.68E+04 +2.71E+04 +2.73E+04 +2.75E+04 +2.78E+04 +2.80E+04 +2.83E+04 +2.85E+04 +2.86E+04 +2.86E+04 +2.87E+04 +2.87E+04 +2.87E+04 +2.87E+04 +2.87E+04 +2.87E+04 +2.87E+04 +2.87E+04 +2.86E+04 +2.87E+04 +2.88E+04 +2.88E+04 +2.88E+04 +2.88E+04 +2.88E+04 +2.88E+04 +2.88E+04 +2.88E+04 +2.88E+04 +2.87E+04 +2.88E+04 +2.89E+04 +2.89E+04 +2.89E+04 +2.89E+04 +2.89E+04 +2.89E+04 +2.89E+04 diff --git a/testcase/KB/INIT_NWM_KB_FABM/INIT.O3h_h b/testcase/KB/INIT_NWM_KB_FABM/INIT.O3h_h new file mode 100644 index 00000000..2266dbc7 --- /dev/null +++ b/testcase/KB/INIT_NWM_KB_FABM/INIT.O3h_h @@ -0,0 +1,43 @@ +2.55E+03 +2.55E+03 +2.55E+03 +2.55E+03 +2.55E+03 +2.55E+03 +2.56E+03 +2.57E+03 +2.58E+03 +2.60E+03 +2.62E+03 +2.64E+03 +2.65E+03 +2.66E+03 +2.67E+03 +2.67E+03 +2.67E+03 +2.67E+03 +2.67E+03 +2.67E+03 +2.67E+03 +2.67E+03 +2.67E+03 +2.67E+03 +2.67E+03 +2.67E+03 +2.67E+03 +2.67E+03 +2.67E+03 +2.67E+03 +2.68E+03 +2.68E+03 +2.68E+03 +2.68E+03 +2.68E+03 +2.68E+03 +2.68E+03 +2.68E+03 +2.68E+03 +2.68E+03 +2.68E+03 +2.68E+03 +2.68E+03 diff --git a/testcase/KB/INIT_NWM_KB_FABM/INIT.O4_n b/testcase/KB/INIT_NWM_KB_FABM/INIT.O4_n new file mode 100644 index 00000000..9ca4c7d3 --- /dev/null +++ b/testcase/KB/INIT_NWM_KB_FABM/INIT.O4_n @@ -0,0 +1,43 @@ +1.00000000000000000000 +1.00000000000000000000 +1.00000000000000000000 +1.00000000000000000000 +1.00000000000000000000 +1.00000000000000000000 +1.00000000000000000000 +1.00000000000000000000 +1.00000000000000000000 +1.00000000000000000000 +1.00000000000000000000 +1.00000000000000000000 +1.00000000000000000000 +1.00000000000000000000 +1.00000000000000000000 +1.00000000000000000000 +1.00000000000000000000 +1.00000000000000000000 +1.00000000000000000000 +1.00000000000000000000 +1.00000000000000000000 +1.00000000000000000000 +1.00000000000000000000 +1.00000000000000000000 +1.00000000000000000000 +1.00000000000000000000 +1.00000000000000000000 +1.00000000000000000000 +1.00000000000000000000 +1.00000000000000000000 +1.00000000000000000000 +1.00000000000000000000 +1.00000000000000000000 +1.00000000000000000000 +1.00000000000000000000 +1.00000000000000000000 +1.00000000000000000000 +1.00000000000000000000 +1.00000000000000000000 +1.00000000000000000000 +1.00000000000000000000 +1.00000000000000000000 +1.00000000000000000000 diff --git a/testcase/KB/INIT_NWM_KB_FABM/INIT.O5_c b/testcase/KB/INIT_NWM_KB_FABM/INIT.O5_c new file mode 100644 index 00000000..16c4ec30 --- /dev/null +++ b/testcase/KB/INIT_NWM_KB_FABM/INIT.O5_c @@ -0,0 +1,43 @@ +0.00010000000000000000 +0.00010000000000000000 +0.00010000000000000000 +0.00010000000000000000 +0.00010000000000000000 +0.00010000000000000000 +0.00010000000000000000 +0.00010000000000000000 +0.00010000000000000000 +0.00010000000000000000 +0.00010000000000000000 +0.00010000000000000000 +0.00010000000000000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 diff --git a/testcase/KB/INIT_NWM_KB_FABM/INIT.P1_Chl b/testcase/KB/INIT_NWM_KB_FABM/INIT.P1_Chl new file mode 100644 index 00000000..d4d178f3 --- /dev/null +++ b/testcase/KB/INIT_NWM_KB_FABM/INIT.P1_Chl @@ -0,0 +1,43 @@ +0.10000000000000000000 +0.10000000000000000000 +0.10000000000000000000 +0.10000000000000000000 +0.10000000000000000000 +0.10000000000000000000 +0.10000000000000000000 +0.10000000000000000000 +0.10000000000000000000 +0.10000000000000000000 +0.10000000000000000000 +0.10000000000000000000 +0.10000000000000000000 +0.00000000001000000000 +0.00000000001000000000 +0.00000000001000000000 +0.00000000001000000000 +0.00000000001000000000 +0.00000000001000000000 +0.00000000001000000000 +0.00000000001000000000 +0.00000000001000000000 +0.00000000001000000000 +0.00000000001000000000 +0.00000000001000000000 +0.00000000001000000000 +0.00000000001000000000 +0.00000000001000000000 +0.00000000001000000000 +0.00000000001000000000 +0.00000000001000000000 +0.00000000001000000000 +0.00000000001000000000 +0.00000000001000000000 +0.00000000001000000000 +0.00000000001000000000 +0.00000000001000000000 +0.00000000001000000000 +0.00000000001000000000 +0.00000000001000000000 +0.00000000001000000000 +0.00000000001000000000 +0.00000000001000000000 diff --git a/testcase/KB/INIT_NWM_KB_FABM/INIT.P1_c b/testcase/KB/INIT_NWM_KB_FABM/INIT.P1_c new file mode 100644 index 00000000..b938c94d --- /dev/null +++ b/testcase/KB/INIT_NWM_KB_FABM/INIT.P1_c @@ -0,0 +1,43 @@ +8.00000000000000000000 +8.00000000000000000000 +8.00000000000000000000 +8.00000000000000000000 +8.00000000000000000000 +8.00000000000000000000 +8.00000000000000000000 +8.00000000000000000000 +8.00000000000000000000 +8.00000000000000000000 +8.00000000000000000000 +8.00000000000000000000 +8.00000000000000000000 +0.00000000080000000000 +0.00000000080000000000 +0.00000000080000000000 +0.00000000080000000000 +0.00000000080000000000 +0.00000000080000000000 +0.00000000080000000000 +0.00000000080000000000 +0.00000000080000000000 +0.00000000080000000000 +0.00000000080000000000 +0.00000000080000000000 +0.00000000080000000000 +0.00000000080000000000 +0.00000000080000000000 +0.00000000080000000000 +0.00000000080000000000 +0.00000000080000000000 +0.00000000080000000000 +0.00000000080000000000 +0.00000000080000000000 +0.00000000080000000000 +0.00000000080000000000 +0.00000000080000000000 +0.00000000080000000000 +0.00000000080000000000 +0.00000000080000000000 +0.00000000080000000000 +0.00000000080000000000 +0.00000000080000000000 diff --git a/testcase/KB/INIT_NWM_KB_FABM/INIT.P1_n b/testcase/KB/INIT_NWM_KB_FABM/INIT.P1_n new file mode 100644 index 00000000..e97c5017 --- /dev/null +++ b/testcase/KB/INIT_NWM_KB_FABM/INIT.P1_n @@ -0,0 +1,43 @@ +0.01000000000000000000 +0.01000000000000000000 +0.01000000000000000000 +0.01000000000000000000 +0.01000000000000000000 +0.01000000000000000000 +0.01000000000000000000 +0.01000000000000000000 +0.01000000000000000000 +0.01000000000000000000 +0.01000000000000000000 +0.01000000000000000000 +0.01000000000000000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 diff --git a/testcase/KB/INIT_NWM_KB_FABM/INIT.P1_p b/testcase/KB/INIT_NWM_KB_FABM/INIT.P1_p new file mode 100644 index 00000000..16c4ec30 --- /dev/null +++ b/testcase/KB/INIT_NWM_KB_FABM/INIT.P1_p @@ -0,0 +1,43 @@ +0.00010000000000000000 +0.00010000000000000000 +0.00010000000000000000 +0.00010000000000000000 +0.00010000000000000000 +0.00010000000000000000 +0.00010000000000000000 +0.00010000000000000000 +0.00010000000000000000 +0.00010000000000000000 +0.00010000000000000000 +0.00010000000000000000 +0.00010000000000000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 diff --git a/testcase/KB/INIT_NWM_KB_FABM/INIT.P1_s b/testcase/KB/INIT_NWM_KB_FABM/INIT.P1_s new file mode 100644 index 00000000..e97c5017 --- /dev/null +++ b/testcase/KB/INIT_NWM_KB_FABM/INIT.P1_s @@ -0,0 +1,43 @@ +0.01000000000000000000 +0.01000000000000000000 +0.01000000000000000000 +0.01000000000000000000 +0.01000000000000000000 +0.01000000000000000000 +0.01000000000000000000 +0.01000000000000000000 +0.01000000000000000000 +0.01000000000000000000 +0.01000000000000000000 +0.01000000000000000000 +0.01000000000000000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 diff --git a/testcase/KB/INIT_NWM_KB_FABM/INIT.P2_Chl b/testcase/KB/INIT_NWM_KB_FABM/INIT.P2_Chl new file mode 100644 index 00000000..d4d178f3 --- /dev/null +++ b/testcase/KB/INIT_NWM_KB_FABM/INIT.P2_Chl @@ -0,0 +1,43 @@ +0.10000000000000000000 +0.10000000000000000000 +0.10000000000000000000 +0.10000000000000000000 +0.10000000000000000000 +0.10000000000000000000 +0.10000000000000000000 +0.10000000000000000000 +0.10000000000000000000 +0.10000000000000000000 +0.10000000000000000000 +0.10000000000000000000 +0.10000000000000000000 +0.00000000001000000000 +0.00000000001000000000 +0.00000000001000000000 +0.00000000001000000000 +0.00000000001000000000 +0.00000000001000000000 +0.00000000001000000000 +0.00000000001000000000 +0.00000000001000000000 +0.00000000001000000000 +0.00000000001000000000 +0.00000000001000000000 +0.00000000001000000000 +0.00000000001000000000 +0.00000000001000000000 +0.00000000001000000000 +0.00000000001000000000 +0.00000000001000000000 +0.00000000001000000000 +0.00000000001000000000 +0.00000000001000000000 +0.00000000001000000000 +0.00000000001000000000 +0.00000000001000000000 +0.00000000001000000000 +0.00000000001000000000 +0.00000000001000000000 +0.00000000001000000000 +0.00000000001000000000 +0.00000000001000000000 diff --git a/testcase/KB/INIT_NWM_KB_FABM/INIT.P2_c b/testcase/KB/INIT_NWM_KB_FABM/INIT.P2_c new file mode 100644 index 00000000..b938c94d --- /dev/null +++ b/testcase/KB/INIT_NWM_KB_FABM/INIT.P2_c @@ -0,0 +1,43 @@ +8.00000000000000000000 +8.00000000000000000000 +8.00000000000000000000 +8.00000000000000000000 +8.00000000000000000000 +8.00000000000000000000 +8.00000000000000000000 +8.00000000000000000000 +8.00000000000000000000 +8.00000000000000000000 +8.00000000000000000000 +8.00000000000000000000 +8.00000000000000000000 +0.00000000080000000000 +0.00000000080000000000 +0.00000000080000000000 +0.00000000080000000000 +0.00000000080000000000 +0.00000000080000000000 +0.00000000080000000000 +0.00000000080000000000 +0.00000000080000000000 +0.00000000080000000000 +0.00000000080000000000 +0.00000000080000000000 +0.00000000080000000000 +0.00000000080000000000 +0.00000000080000000000 +0.00000000080000000000 +0.00000000080000000000 +0.00000000080000000000 +0.00000000080000000000 +0.00000000080000000000 +0.00000000080000000000 +0.00000000080000000000 +0.00000000080000000000 +0.00000000080000000000 +0.00000000080000000000 +0.00000000080000000000 +0.00000000080000000000 +0.00000000080000000000 +0.00000000080000000000 +0.00000000080000000000 diff --git a/testcase/KB/INIT_NWM_KB_FABM/INIT.P2_n b/testcase/KB/INIT_NWM_KB_FABM/INIT.P2_n new file mode 100644 index 00000000..e97c5017 --- /dev/null +++ b/testcase/KB/INIT_NWM_KB_FABM/INIT.P2_n @@ -0,0 +1,43 @@ +0.01000000000000000000 +0.01000000000000000000 +0.01000000000000000000 +0.01000000000000000000 +0.01000000000000000000 +0.01000000000000000000 +0.01000000000000000000 +0.01000000000000000000 +0.01000000000000000000 +0.01000000000000000000 +0.01000000000000000000 +0.01000000000000000000 +0.01000000000000000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 diff --git a/testcase/KB/INIT_NWM_KB_FABM/INIT.P2_p b/testcase/KB/INIT_NWM_KB_FABM/INIT.P2_p new file mode 100644 index 00000000..16c4ec30 --- /dev/null +++ b/testcase/KB/INIT_NWM_KB_FABM/INIT.P2_p @@ -0,0 +1,43 @@ +0.00010000000000000000 +0.00010000000000000000 +0.00010000000000000000 +0.00010000000000000000 +0.00010000000000000000 +0.00010000000000000000 +0.00010000000000000000 +0.00010000000000000000 +0.00010000000000000000 +0.00010000000000000000 +0.00010000000000000000 +0.00010000000000000000 +0.00010000000000000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 diff --git a/testcase/KB/INIT_NWM_KB_FABM/INIT.P3_Chl b/testcase/KB/INIT_NWM_KB_FABM/INIT.P3_Chl new file mode 100644 index 00000000..d4d178f3 --- /dev/null +++ b/testcase/KB/INIT_NWM_KB_FABM/INIT.P3_Chl @@ -0,0 +1,43 @@ +0.10000000000000000000 +0.10000000000000000000 +0.10000000000000000000 +0.10000000000000000000 +0.10000000000000000000 +0.10000000000000000000 +0.10000000000000000000 +0.10000000000000000000 +0.10000000000000000000 +0.10000000000000000000 +0.10000000000000000000 +0.10000000000000000000 +0.10000000000000000000 +0.00000000001000000000 +0.00000000001000000000 +0.00000000001000000000 +0.00000000001000000000 +0.00000000001000000000 +0.00000000001000000000 +0.00000000001000000000 +0.00000000001000000000 +0.00000000001000000000 +0.00000000001000000000 +0.00000000001000000000 +0.00000000001000000000 +0.00000000001000000000 +0.00000000001000000000 +0.00000000001000000000 +0.00000000001000000000 +0.00000000001000000000 +0.00000000001000000000 +0.00000000001000000000 +0.00000000001000000000 +0.00000000001000000000 +0.00000000001000000000 +0.00000000001000000000 +0.00000000001000000000 +0.00000000001000000000 +0.00000000001000000000 +0.00000000001000000000 +0.00000000001000000000 +0.00000000001000000000 +0.00000000001000000000 diff --git a/testcase/KB/INIT_NWM_KB_FABM/INIT.P3_c b/testcase/KB/INIT_NWM_KB_FABM/INIT.P3_c new file mode 100644 index 00000000..b938c94d --- /dev/null +++ b/testcase/KB/INIT_NWM_KB_FABM/INIT.P3_c @@ -0,0 +1,43 @@ +8.00000000000000000000 +8.00000000000000000000 +8.00000000000000000000 +8.00000000000000000000 +8.00000000000000000000 +8.00000000000000000000 +8.00000000000000000000 +8.00000000000000000000 +8.00000000000000000000 +8.00000000000000000000 +8.00000000000000000000 +8.00000000000000000000 +8.00000000000000000000 +0.00000000080000000000 +0.00000000080000000000 +0.00000000080000000000 +0.00000000080000000000 +0.00000000080000000000 +0.00000000080000000000 +0.00000000080000000000 +0.00000000080000000000 +0.00000000080000000000 +0.00000000080000000000 +0.00000000080000000000 +0.00000000080000000000 +0.00000000080000000000 +0.00000000080000000000 +0.00000000080000000000 +0.00000000080000000000 +0.00000000080000000000 +0.00000000080000000000 +0.00000000080000000000 +0.00000000080000000000 +0.00000000080000000000 +0.00000000080000000000 +0.00000000080000000000 +0.00000000080000000000 +0.00000000080000000000 +0.00000000080000000000 +0.00000000080000000000 +0.00000000080000000000 +0.00000000080000000000 +0.00000000080000000000 diff --git a/testcase/KB/INIT_NWM_KB_FABM/INIT.P3_n b/testcase/KB/INIT_NWM_KB_FABM/INIT.P3_n new file mode 100644 index 00000000..e97c5017 --- /dev/null +++ b/testcase/KB/INIT_NWM_KB_FABM/INIT.P3_n @@ -0,0 +1,43 @@ +0.01000000000000000000 +0.01000000000000000000 +0.01000000000000000000 +0.01000000000000000000 +0.01000000000000000000 +0.01000000000000000000 +0.01000000000000000000 +0.01000000000000000000 +0.01000000000000000000 +0.01000000000000000000 +0.01000000000000000000 +0.01000000000000000000 +0.01000000000000000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 diff --git a/testcase/KB/INIT_NWM_KB_FABM/INIT.P3_p b/testcase/KB/INIT_NWM_KB_FABM/INIT.P3_p new file mode 100644 index 00000000..16c4ec30 --- /dev/null +++ b/testcase/KB/INIT_NWM_KB_FABM/INIT.P3_p @@ -0,0 +1,43 @@ +0.00010000000000000000 +0.00010000000000000000 +0.00010000000000000000 +0.00010000000000000000 +0.00010000000000000000 +0.00010000000000000000 +0.00010000000000000000 +0.00010000000000000000 +0.00010000000000000000 +0.00010000000000000000 +0.00010000000000000000 +0.00010000000000000000 +0.00010000000000000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 diff --git a/testcase/KB/INIT_NWM_KB_FABM/INIT.P4_Chl b/testcase/KB/INIT_NWM_KB_FABM/INIT.P4_Chl new file mode 100644 index 00000000..d4d178f3 --- /dev/null +++ b/testcase/KB/INIT_NWM_KB_FABM/INIT.P4_Chl @@ -0,0 +1,43 @@ +0.10000000000000000000 +0.10000000000000000000 +0.10000000000000000000 +0.10000000000000000000 +0.10000000000000000000 +0.10000000000000000000 +0.10000000000000000000 +0.10000000000000000000 +0.10000000000000000000 +0.10000000000000000000 +0.10000000000000000000 +0.10000000000000000000 +0.10000000000000000000 +0.00000000001000000000 +0.00000000001000000000 +0.00000000001000000000 +0.00000000001000000000 +0.00000000001000000000 +0.00000000001000000000 +0.00000000001000000000 +0.00000000001000000000 +0.00000000001000000000 +0.00000000001000000000 +0.00000000001000000000 +0.00000000001000000000 +0.00000000001000000000 +0.00000000001000000000 +0.00000000001000000000 +0.00000000001000000000 +0.00000000001000000000 +0.00000000001000000000 +0.00000000001000000000 +0.00000000001000000000 +0.00000000001000000000 +0.00000000001000000000 +0.00000000001000000000 +0.00000000001000000000 +0.00000000001000000000 +0.00000000001000000000 +0.00000000001000000000 +0.00000000001000000000 +0.00000000001000000000 +0.00000000001000000000 diff --git a/testcase/KB/INIT_NWM_KB_FABM/INIT.P4_c b/testcase/KB/INIT_NWM_KB_FABM/INIT.P4_c new file mode 100644 index 00000000..b938c94d --- /dev/null +++ b/testcase/KB/INIT_NWM_KB_FABM/INIT.P4_c @@ -0,0 +1,43 @@ +8.00000000000000000000 +8.00000000000000000000 +8.00000000000000000000 +8.00000000000000000000 +8.00000000000000000000 +8.00000000000000000000 +8.00000000000000000000 +8.00000000000000000000 +8.00000000000000000000 +8.00000000000000000000 +8.00000000000000000000 +8.00000000000000000000 +8.00000000000000000000 +0.00000000080000000000 +0.00000000080000000000 +0.00000000080000000000 +0.00000000080000000000 +0.00000000080000000000 +0.00000000080000000000 +0.00000000080000000000 +0.00000000080000000000 +0.00000000080000000000 +0.00000000080000000000 +0.00000000080000000000 +0.00000000080000000000 +0.00000000080000000000 +0.00000000080000000000 +0.00000000080000000000 +0.00000000080000000000 +0.00000000080000000000 +0.00000000080000000000 +0.00000000080000000000 +0.00000000080000000000 +0.00000000080000000000 +0.00000000080000000000 +0.00000000080000000000 +0.00000000080000000000 +0.00000000080000000000 +0.00000000080000000000 +0.00000000080000000000 +0.00000000080000000000 +0.00000000080000000000 +0.00000000080000000000 diff --git a/testcase/KB/INIT_NWM_KB_FABM/INIT.P4_n b/testcase/KB/INIT_NWM_KB_FABM/INIT.P4_n new file mode 100644 index 00000000..e97c5017 --- /dev/null +++ b/testcase/KB/INIT_NWM_KB_FABM/INIT.P4_n @@ -0,0 +1,43 @@ +0.01000000000000000000 +0.01000000000000000000 +0.01000000000000000000 +0.01000000000000000000 +0.01000000000000000000 +0.01000000000000000000 +0.01000000000000000000 +0.01000000000000000000 +0.01000000000000000000 +0.01000000000000000000 +0.01000000000000000000 +0.01000000000000000000 +0.01000000000000000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 diff --git a/testcase/KB/INIT_NWM_KB_FABM/INIT.P4_p b/testcase/KB/INIT_NWM_KB_FABM/INIT.P4_p new file mode 100644 index 00000000..16c4ec30 --- /dev/null +++ b/testcase/KB/INIT_NWM_KB_FABM/INIT.P4_p @@ -0,0 +1,43 @@ +0.00010000000000000000 +0.00010000000000000000 +0.00010000000000000000 +0.00010000000000000000 +0.00010000000000000000 +0.00010000000000000000 +0.00010000000000000000 +0.00010000000000000000 +0.00010000000000000000 +0.00010000000000000000 +0.00010000000000000000 +0.00010000000000000000 +0.00010000000000000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 diff --git a/testcase/KB/INIT_NWM_KB_FABM/INIT.R1_c b/testcase/KB/INIT_NWM_KB_FABM/INIT.R1_c new file mode 100644 index 00000000..e97c5017 --- /dev/null +++ b/testcase/KB/INIT_NWM_KB_FABM/INIT.R1_c @@ -0,0 +1,43 @@ +0.01000000000000000000 +0.01000000000000000000 +0.01000000000000000000 +0.01000000000000000000 +0.01000000000000000000 +0.01000000000000000000 +0.01000000000000000000 +0.01000000000000000000 +0.01000000000000000000 +0.01000000000000000000 +0.01000000000000000000 +0.01000000000000000000 +0.01000000000000000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 diff --git a/testcase/KB/INIT_NWM_KB_FABM/INIT.R1_n b/testcase/KB/INIT_NWM_KB_FABM/INIT.R1_n new file mode 100644 index 00000000..fce7c08f --- /dev/null +++ b/testcase/KB/INIT_NWM_KB_FABM/INIT.R1_n @@ -0,0 +1,43 @@ +0.00040000000000000000 +0.00040000000000000000 +0.00040000000000000000 +0.00040000000000000000 +0.00040000000000000000 +0.00040000000000000000 +0.00040000000000000000 +0.00040000000000000000 +0.00040000000000000000 +0.00040000000000000000 +0.00040000000000000000 +0.00040000000000000000 +0.00040000000000000000 +0.00000000000004000000 +0.00000000000004000000 +0.00000000000004000000 +0.00000000000004000000 +0.00000000000004000000 +0.00000000000004000000 +0.00000000000004000000 +0.00000000000004000000 +0.00000000000004000000 +0.00000000000004000000 +0.00000000000004000000 +0.00000000000004000000 +0.00000000000004000000 +0.00000000000004000000 +0.00000000000004000000 +0.00000000000004000000 +0.00000000000004000000 +0.00000000000004000000 +0.00000000000004000000 +0.00000000000004000000 +0.00000000000004000000 +0.00000000000004000000 +0.00000000000004000000 +0.00000000000004000000 +0.00000000000004000000 +0.00000000000004000000 +0.00000000000004000000 +0.00000000000004000000 +0.00000000000004000000 +0.00000000000004000000 diff --git a/testcase/KB/INIT_NWM_KB_FABM/INIT.R1_p b/testcase/KB/INIT_NWM_KB_FABM/INIT.R1_p new file mode 100644 index 00000000..d3eeb65b --- /dev/null +++ b/testcase/KB/INIT_NWM_KB_FABM/INIT.R1_p @@ -0,0 +1,43 @@ +0.00004000000000000000 +0.00004000000000000000 +0.00004000000000000000 +0.00004000000000000000 +0.00004000000000000000 +0.00004000000000000000 +0.00004000000000000000 +0.00004000000000000000 +0.00004000000000000000 +0.00004000000000000000 +0.00004000000000000000 +0.00004000000000000000 +0.00004000000000000000 +0.00000000000000400000 +0.00000000000000400000 +0.00000000000000400000 +0.00000000000000400000 +0.00000000000000400000 +0.00000000000000400000 +0.00000000000000400000 +0.00000000000000400000 +0.00000000000000400000 +0.00000000000000400000 +0.00000000000000400000 +0.00000000000000400000 +0.00000000000000400000 +0.00000000000000400000 +0.00000000000000400000 +0.00000000000000400000 +0.00000000000000400000 +0.00000000000000400000 +0.00000000000000400000 +0.00000000000000400000 +0.00000000000000400000 +0.00000000000000400000 +0.00000000000000400000 +0.00000000000000400000 +0.00000000000000400000 +0.00000000000000400000 +0.00000000000000400000 +0.00000000000000400000 +0.00000000000000400000 +0.00000000000000400000 diff --git a/testcase/KB/INIT_NWM_KB_FABM/INIT.R1_s b/testcase/KB/INIT_NWM_KB_FABM/INIT.R1_s new file mode 100644 index 00000000..79a0ae8c --- /dev/null +++ b/testcase/KB/INIT_NWM_KB_FABM/INIT.R1_s @@ -0,0 +1,43 @@ +0.00000100000000000000 +0.00000100000000000000 +0.00000100000000000000 +0.00000100000000000000 +0.00000100000000000000 +0.00000100000000000000 +0.00000100000000000000 +0.00000100000000000000 +0.00000100000000000000 +0.00000100000000000000 +0.00000100000000000000 +0.00000100000000000000 +0.00000100000000000000 +0.00000000000000010000 +0.00000000000000010000 +0.00000000000000010000 +0.00000000000000010000 +0.00000000000000010000 +0.00000000000000010000 +0.00000000000000010000 +0.00000000000000010000 +0.00000000000000010000 +0.00000000000000010000 +0.00000000000000010000 +0.00000000000000010000 +0.00000000000000010000 +0.00000000000000010000 +0.00000000000000010000 +0.00000000000000010000 +0.00000000000000010000 +0.00000000000000010000 +0.00000000000000010000 +0.00000000000000010000 +0.00000000000000010000 +0.00000000000000010000 +0.00000000000000010000 +0.00000000000000010000 +0.00000000000000010000 +0.00000000000000010000 +0.00000000000000010000 +0.00000000000000010000 +0.00000000000000010000 +0.00000000000000010000 diff --git a/testcase/KB/INIT_NWM_KB_FABM/INIT.R2_c b/testcase/KB/INIT_NWM_KB_FABM/INIT.R2_c new file mode 100644 index 00000000..e97c5017 --- /dev/null +++ b/testcase/KB/INIT_NWM_KB_FABM/INIT.R2_c @@ -0,0 +1,43 @@ +0.01000000000000000000 +0.01000000000000000000 +0.01000000000000000000 +0.01000000000000000000 +0.01000000000000000000 +0.01000000000000000000 +0.01000000000000000000 +0.01000000000000000000 +0.01000000000000000000 +0.01000000000000000000 +0.01000000000000000000 +0.01000000000000000000 +0.01000000000000000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 diff --git a/testcase/KB/INIT_NWM_KB_FABM/INIT.R3_c b/testcase/KB/INIT_NWM_KB_FABM/INIT.R3_c new file mode 100644 index 00000000..16c4ec30 --- /dev/null +++ b/testcase/KB/INIT_NWM_KB_FABM/INIT.R3_c @@ -0,0 +1,43 @@ +0.00010000000000000000 +0.00010000000000000000 +0.00010000000000000000 +0.00010000000000000000 +0.00010000000000000000 +0.00010000000000000000 +0.00010000000000000000 +0.00010000000000000000 +0.00010000000000000000 +0.00010000000000000000 +0.00010000000000000000 +0.00010000000000000000 +0.00010000000000000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 diff --git a/testcase/KB/INIT_NWM_KB_FABM/INIT.R6_c b/testcase/KB/INIT_NWM_KB_FABM/INIT.R6_c new file mode 100644 index 00000000..e97c5017 --- /dev/null +++ b/testcase/KB/INIT_NWM_KB_FABM/INIT.R6_c @@ -0,0 +1,43 @@ +0.01000000000000000000 +0.01000000000000000000 +0.01000000000000000000 +0.01000000000000000000 +0.01000000000000000000 +0.01000000000000000000 +0.01000000000000000000 +0.01000000000000000000 +0.01000000000000000000 +0.01000000000000000000 +0.01000000000000000000 +0.01000000000000000000 +0.01000000000000000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 diff --git a/testcase/KB/INIT_NWM_KB_FABM/INIT.R6_n b/testcase/KB/INIT_NWM_KB_FABM/INIT.R6_n new file mode 100644 index 00000000..c86f9c71 --- /dev/null +++ b/testcase/KB/INIT_NWM_KB_FABM/INIT.R6_n @@ -0,0 +1,43 @@ +0.00100000000000000000 +0.00100000000000000000 +0.00100000000000000000 +0.00100000000000000000 +0.00100000000000000000 +0.00100000000000000000 +0.00100000000000000000 +0.00100000000000000000 +0.00100000000000000000 +0.00100000000000000000 +0.00100000000000000000 +0.00100000000000000000 +0.00100000000000000000 +0.00000000000010000000 +0.00000000000010000000 +0.00000000000010000000 +0.00000000000010000000 +0.00000000000010000000 +0.00000000000010000000 +0.00000000000010000000 +0.00000000000010000000 +0.00000000000010000000 +0.00000000000010000000 +0.00000000000010000000 +0.00000000000010000000 +0.00000000000010000000 +0.00000000000010000000 +0.00000000000010000000 +0.00000000000010000000 +0.00000000000010000000 +0.00000000000010000000 +0.00000000000010000000 +0.00000000000010000000 +0.00000000000010000000 +0.00000000000010000000 +0.00000000000010000000 +0.00000000000010000000 +0.00000000000010000000 +0.00000000000010000000 +0.00000000000010000000 +0.00000000000010000000 +0.00000000000010000000 +0.00000000000010000000 diff --git a/testcase/KB/INIT_NWM_KB_FABM/INIT.R6_p b/testcase/KB/INIT_NWM_KB_FABM/INIT.R6_p new file mode 100644 index 00000000..16c4ec30 --- /dev/null +++ b/testcase/KB/INIT_NWM_KB_FABM/INIT.R6_p @@ -0,0 +1,43 @@ +0.00010000000000000000 +0.00010000000000000000 +0.00010000000000000000 +0.00010000000000000000 +0.00010000000000000000 +0.00010000000000000000 +0.00010000000000000000 +0.00010000000000000000 +0.00010000000000000000 +0.00010000000000000000 +0.00010000000000000000 +0.00010000000000000000 +0.00010000000000000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 diff --git a/testcase/KB/INIT_NWM_KB_FABM/INIT.R6_s b/testcase/KB/INIT_NWM_KB_FABM/INIT.R6_s new file mode 100644 index 00000000..c86f9c71 --- /dev/null +++ b/testcase/KB/INIT_NWM_KB_FABM/INIT.R6_s @@ -0,0 +1,43 @@ +0.00100000000000000000 +0.00100000000000000000 +0.00100000000000000000 +0.00100000000000000000 +0.00100000000000000000 +0.00100000000000000000 +0.00100000000000000000 +0.00100000000000000000 +0.00100000000000000000 +0.00100000000000000000 +0.00100000000000000000 +0.00100000000000000000 +0.00100000000000000000 +0.00000000000010000000 +0.00000000000010000000 +0.00000000000010000000 +0.00000000000010000000 +0.00000000000010000000 +0.00000000000010000000 +0.00000000000010000000 +0.00000000000010000000 +0.00000000000010000000 +0.00000000000010000000 +0.00000000000010000000 +0.00000000000010000000 +0.00000000000010000000 +0.00000000000010000000 +0.00000000000010000000 +0.00000000000010000000 +0.00000000000010000000 +0.00000000000010000000 +0.00000000000010000000 +0.00000000000010000000 +0.00000000000010000000 +0.00000000000010000000 +0.00000000000010000000 +0.00000000000010000000 +0.00000000000010000000 +0.00000000000010000000 +0.00000000000010000000 +0.00000000000010000000 +0.00000000000010000000 +0.00000000000010000000 diff --git a/testcase/KB/INIT_NWM_KB_FABM/INIT.R8_c b/testcase/KB/INIT_NWM_KB_FABM/INIT.R8_c new file mode 100644 index 00000000..e97c5017 --- /dev/null +++ b/testcase/KB/INIT_NWM_KB_FABM/INIT.R8_c @@ -0,0 +1,43 @@ +0.01000000000000000000 +0.01000000000000000000 +0.01000000000000000000 +0.01000000000000000000 +0.01000000000000000000 +0.01000000000000000000 +0.01000000000000000000 +0.01000000000000000000 +0.01000000000000000000 +0.01000000000000000000 +0.01000000000000000000 +0.01000000000000000000 +0.01000000000000000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 diff --git a/testcase/KB/INIT_NWM_KB_FABM/INIT.R8_n b/testcase/KB/INIT_NWM_KB_FABM/INIT.R8_n new file mode 100644 index 00000000..c86f9c71 --- /dev/null +++ b/testcase/KB/INIT_NWM_KB_FABM/INIT.R8_n @@ -0,0 +1,43 @@ +0.00100000000000000000 +0.00100000000000000000 +0.00100000000000000000 +0.00100000000000000000 +0.00100000000000000000 +0.00100000000000000000 +0.00100000000000000000 +0.00100000000000000000 +0.00100000000000000000 +0.00100000000000000000 +0.00100000000000000000 +0.00100000000000000000 +0.00100000000000000000 +0.00000000000010000000 +0.00000000000010000000 +0.00000000000010000000 +0.00000000000010000000 +0.00000000000010000000 +0.00000000000010000000 +0.00000000000010000000 +0.00000000000010000000 +0.00000000000010000000 +0.00000000000010000000 +0.00000000000010000000 +0.00000000000010000000 +0.00000000000010000000 +0.00000000000010000000 +0.00000000000010000000 +0.00000000000010000000 +0.00000000000010000000 +0.00000000000010000000 +0.00000000000010000000 +0.00000000000010000000 +0.00000000000010000000 +0.00000000000010000000 +0.00000000000010000000 +0.00000000000010000000 +0.00000000000010000000 +0.00000000000010000000 +0.00000000000010000000 +0.00000000000010000000 +0.00000000000010000000 +0.00000000000010000000 diff --git a/testcase/KB/INIT_NWM_KB_FABM/INIT.R8_p b/testcase/KB/INIT_NWM_KB_FABM/INIT.R8_p new file mode 100644 index 00000000..16c4ec30 --- /dev/null +++ b/testcase/KB/INIT_NWM_KB_FABM/INIT.R8_p @@ -0,0 +1,43 @@ +0.00010000000000000000 +0.00010000000000000000 +0.00010000000000000000 +0.00010000000000000000 +0.00010000000000000000 +0.00010000000000000000 +0.00010000000000000000 +0.00010000000000000000 +0.00010000000000000000 +0.00010000000000000000 +0.00010000000000000000 +0.00010000000000000000 +0.00010000000000000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 diff --git a/testcase/KB/INIT_NWM_KB_FABM/INIT.R8_s b/testcase/KB/INIT_NWM_KB_FABM/INIT.R8_s new file mode 100644 index 00000000..c86f9c71 --- /dev/null +++ b/testcase/KB/INIT_NWM_KB_FABM/INIT.R8_s @@ -0,0 +1,43 @@ +0.00100000000000000000 +0.00100000000000000000 +0.00100000000000000000 +0.00100000000000000000 +0.00100000000000000000 +0.00100000000000000000 +0.00100000000000000000 +0.00100000000000000000 +0.00100000000000000000 +0.00100000000000000000 +0.00100000000000000000 +0.00100000000000000000 +0.00100000000000000000 +0.00000000000010000000 +0.00000000000010000000 +0.00000000000010000000 +0.00000000000010000000 +0.00000000000010000000 +0.00000000000010000000 +0.00000000000010000000 +0.00000000000010000000 +0.00000000000010000000 +0.00000000000010000000 +0.00000000000010000000 +0.00000000000010000000 +0.00000000000010000000 +0.00000000000010000000 +0.00000000000010000000 +0.00000000000010000000 +0.00000000000010000000 +0.00000000000010000000 +0.00000000000010000000 +0.00000000000010000000 +0.00000000000010000000 +0.00000000000010000000 +0.00000000000010000000 +0.00000000000010000000 +0.00000000000010000000 +0.00000000000010000000 +0.00000000000010000000 +0.00000000000010000000 +0.00000000000010000000 +0.00000000000010000000 diff --git a/testcase/KB/INIT_NWM_KB_FABM/INIT.X1_c b/testcase/KB/INIT_NWM_KB_FABM/INIT.X1_c new file mode 100644 index 00000000..16c4ec30 --- /dev/null +++ b/testcase/KB/INIT_NWM_KB_FABM/INIT.X1_c @@ -0,0 +1,43 @@ +0.00010000000000000000 +0.00010000000000000000 +0.00010000000000000000 +0.00010000000000000000 +0.00010000000000000000 +0.00010000000000000000 +0.00010000000000000000 +0.00010000000000000000 +0.00010000000000000000 +0.00010000000000000000 +0.00010000000000000000 +0.00010000000000000000 +0.00010000000000000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 diff --git a/testcase/KB/INIT_NWM_KB_FABM/INIT.X2_c b/testcase/KB/INIT_NWM_KB_FABM/INIT.X2_c new file mode 100644 index 00000000..16c4ec30 --- /dev/null +++ b/testcase/KB/INIT_NWM_KB_FABM/INIT.X2_c @@ -0,0 +1,43 @@ +0.00010000000000000000 +0.00010000000000000000 +0.00010000000000000000 +0.00010000000000000000 +0.00010000000000000000 +0.00010000000000000000 +0.00010000000000000000 +0.00010000000000000000 +0.00010000000000000000 +0.00010000000000000000 +0.00010000000000000000 +0.00010000000000000000 +0.00010000000000000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 diff --git a/testcase/KB/INIT_NWM_KB_FABM/INIT.X3_c b/testcase/KB/INIT_NWM_KB_FABM/INIT.X3_c new file mode 100644 index 00000000..16c4ec30 --- /dev/null +++ b/testcase/KB/INIT_NWM_KB_FABM/INIT.X3_c @@ -0,0 +1,43 @@ +0.00010000000000000000 +0.00010000000000000000 +0.00010000000000000000 +0.00010000000000000000 +0.00010000000000000000 +0.00010000000000000000 +0.00010000000000000000 +0.00010000000000000000 +0.00010000000000000000 +0.00010000000000000000 +0.00010000000000000000 +0.00010000000000000000 +0.00010000000000000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 diff --git a/testcase/KB/INIT_NWM_KB_FABM/INIT.Z3_c b/testcase/KB/INIT_NWM_KB_FABM/INIT.Z3_c new file mode 100644 index 00000000..399fb79a --- /dev/null +++ b/testcase/KB/INIT_NWM_KB_FABM/INIT.Z3_c @@ -0,0 +1,43 @@ +1.20000000000000000000 +1.20000000000000000000 +1.20000000000000000000 +1.20000000000000000000 +1.20000000000000000000 +1.20000000000000000000 +1.20000000000000000000 +1.20000000000000000000 +1.20000000000000000000 +1.20000000000000000000 +1.20000000000000000000 +1.20000000000000000000 +1.20000000000000000000 +0.00000000012000000000 +0.00000000012000000000 +0.00000000012000000000 +0.00000000012000000000 +0.00000000012000000000 +0.00000000012000000000 +0.00000000012000000000 +0.00000000012000000000 +0.00000000012000000000 +0.00000000012000000000 +0.00000000012000000000 +0.00000000012000000000 +0.00000000012000000000 +0.00000000012000000000 +0.00000000012000000000 +0.00000000012000000000 +0.00000000012000000000 +0.00000000012000000000 +0.00000000012000000000 +0.00000000012000000000 +0.00000000012000000000 +0.00000000012000000000 +0.00000000012000000000 +0.00000000012000000000 +0.00000000012000000000 +0.00000000012000000000 +0.00000000012000000000 +0.00000000012000000000 +0.00000000012000000000 +0.00000000012000000000 diff --git a/testcase/KB/INIT_NWM_KB_FABM/INIT.Z3_n b/testcase/KB/INIT_NWM_KB_FABM/INIT.Z3_n new file mode 100644 index 00000000..15192773 --- /dev/null +++ b/testcase/KB/INIT_NWM_KB_FABM/INIT.Z3_n @@ -0,0 +1,43 @@ +0.01492537313432840000 +0.01492537313432840000 +0.01492537313432840000 +0.01492537313432840000 +0.01492537313432840000 +0.01492537313432840000 +0.01492537313432840000 +0.01492537313432840000 +0.01492537313432840000 +0.01492537313432840000 +0.01492537313432840000 +0.01492537313432840000 +0.01492537313432840000 +0.00000000000149253731 +0.00000000000149253731 +0.00000000000149253731 +0.00000000000149253731 +0.00000000000149253731 +0.00000000000149253731 +0.00000000000149253731 +0.00000000000149253731 +0.00000000000149253731 +0.00000000000149253731 +0.00000000000149253731 +0.00000000000149253731 +0.00000000000149253731 +0.00000000000149253731 +0.00000000000149253731 +0.00000000000149253731 +0.00000000000149253731 +0.00000000000149253731 +0.00000000000149253731 +0.00000000000149253731 +0.00000000000149253731 +0.00000000000149253731 +0.00000000000149253731 +0.00000000000149253731 +0.00000000000149253731 +0.00000000000149253731 +0.00000000000149253731 +0.00000000000149253731 +0.00000000000149253731 +0.00000000000149253731 diff --git a/testcase/KB/INIT_NWM_KB_FABM/INIT.Z3_p b/testcase/KB/INIT_NWM_KB_FABM/INIT.Z3_p new file mode 100644 index 00000000..868ce111 --- /dev/null +++ b/testcase/KB/INIT_NWM_KB_FABM/INIT.Z3_p @@ -0,0 +1,43 @@ +0.00094339622641509400 +0.00094339622641509400 +0.00094339622641509400 +0.00094339622641509400 +0.00094339622641509400 +0.00094339622641509400 +0.00094339622641509400 +0.00094339622641509400 +0.00094339622641509400 +0.00094339622641509400 +0.00094339622641509400 +0.00094339622641509400 +0.00094339622641509400 +0.00000000000009433962 +0.00000000000009433962 +0.00000000000009433962 +0.00000000000009433962 +0.00000000000009433962 +0.00000000000009433962 +0.00000000000009433962 +0.00000000000009433962 +0.00000000000009433962 +0.00000000000009433962 +0.00000000000009433962 +0.00000000000009433962 +0.00000000000009433962 +0.00000000000009433962 +0.00000000000009433962 +0.00000000000009433962 +0.00000000000009433962 +0.00000000000009433962 +0.00000000000009433962 +0.00000000000009433962 +0.00000000000009433962 +0.00000000000009433962 +0.00000000000009433962 +0.00000000000009433962 +0.00000000000009433962 +0.00000000000009433962 +0.00000000000009433962 +0.00000000000009433962 +0.00000000000009433962 +0.00000000000009433962 diff --git a/testcase/KB/INIT_NWM_KB_FABM/INIT.Z4_c b/testcase/KB/INIT_NWM_KB_FABM/INIT.Z4_c new file mode 100644 index 00000000..399fb79a --- /dev/null +++ b/testcase/KB/INIT_NWM_KB_FABM/INIT.Z4_c @@ -0,0 +1,43 @@ +1.20000000000000000000 +1.20000000000000000000 +1.20000000000000000000 +1.20000000000000000000 +1.20000000000000000000 +1.20000000000000000000 +1.20000000000000000000 +1.20000000000000000000 +1.20000000000000000000 +1.20000000000000000000 +1.20000000000000000000 +1.20000000000000000000 +1.20000000000000000000 +0.00000000012000000000 +0.00000000012000000000 +0.00000000012000000000 +0.00000000012000000000 +0.00000000012000000000 +0.00000000012000000000 +0.00000000012000000000 +0.00000000012000000000 +0.00000000012000000000 +0.00000000012000000000 +0.00000000012000000000 +0.00000000012000000000 +0.00000000012000000000 +0.00000000012000000000 +0.00000000012000000000 +0.00000000012000000000 +0.00000000012000000000 +0.00000000012000000000 +0.00000000012000000000 +0.00000000012000000000 +0.00000000012000000000 +0.00000000012000000000 +0.00000000012000000000 +0.00000000012000000000 +0.00000000012000000000 +0.00000000012000000000 +0.00000000012000000000 +0.00000000012000000000 +0.00000000012000000000 +0.00000000012000000000 diff --git a/testcase/KB/INIT_NWM_KB_FABM/INIT.Z4_n b/testcase/KB/INIT_NWM_KB_FABM/INIT.Z4_n new file mode 100644 index 00000000..15192773 --- /dev/null +++ b/testcase/KB/INIT_NWM_KB_FABM/INIT.Z4_n @@ -0,0 +1,43 @@ +0.01492537313432840000 +0.01492537313432840000 +0.01492537313432840000 +0.01492537313432840000 +0.01492537313432840000 +0.01492537313432840000 +0.01492537313432840000 +0.01492537313432840000 +0.01492537313432840000 +0.01492537313432840000 +0.01492537313432840000 +0.01492537313432840000 +0.01492537313432840000 +0.00000000000149253731 +0.00000000000149253731 +0.00000000000149253731 +0.00000000000149253731 +0.00000000000149253731 +0.00000000000149253731 +0.00000000000149253731 +0.00000000000149253731 +0.00000000000149253731 +0.00000000000149253731 +0.00000000000149253731 +0.00000000000149253731 +0.00000000000149253731 +0.00000000000149253731 +0.00000000000149253731 +0.00000000000149253731 +0.00000000000149253731 +0.00000000000149253731 +0.00000000000149253731 +0.00000000000149253731 +0.00000000000149253731 +0.00000000000149253731 +0.00000000000149253731 +0.00000000000149253731 +0.00000000000149253731 +0.00000000000149253731 +0.00000000000149253731 +0.00000000000149253731 +0.00000000000149253731 +0.00000000000149253731 diff --git a/testcase/KB/INIT_NWM_KB_FABM/INIT.Z4_p b/testcase/KB/INIT_NWM_KB_FABM/INIT.Z4_p new file mode 100644 index 00000000..868ce111 --- /dev/null +++ b/testcase/KB/INIT_NWM_KB_FABM/INIT.Z4_p @@ -0,0 +1,43 @@ +0.00094339622641509400 +0.00094339622641509400 +0.00094339622641509400 +0.00094339622641509400 +0.00094339622641509400 +0.00094339622641509400 +0.00094339622641509400 +0.00094339622641509400 +0.00094339622641509400 +0.00094339622641509400 +0.00094339622641509400 +0.00094339622641509400 +0.00094339622641509400 +0.00000000000009433962 +0.00000000000009433962 +0.00000000000009433962 +0.00000000000009433962 +0.00000000000009433962 +0.00000000000009433962 +0.00000000000009433962 +0.00000000000009433962 +0.00000000000009433962 +0.00000000000009433962 +0.00000000000009433962 +0.00000000000009433962 +0.00000000000009433962 +0.00000000000009433962 +0.00000000000009433962 +0.00000000000009433962 +0.00000000000009433962 +0.00000000000009433962 +0.00000000000009433962 +0.00000000000009433962 +0.00000000000009433962 +0.00000000000009433962 +0.00000000000009433962 +0.00000000000009433962 +0.00000000000009433962 +0.00000000000009433962 +0.00000000000009433962 +0.00000000000009433962 +0.00000000000009433962 +0.00000000000009433962 diff --git a/testcase/KB/INIT_NWM_KB_FABM/INIT.Z5_c b/testcase/KB/INIT_NWM_KB_FABM/INIT.Z5_c new file mode 100644 index 00000000..399fb79a --- /dev/null +++ b/testcase/KB/INIT_NWM_KB_FABM/INIT.Z5_c @@ -0,0 +1,43 @@ +1.20000000000000000000 +1.20000000000000000000 +1.20000000000000000000 +1.20000000000000000000 +1.20000000000000000000 +1.20000000000000000000 +1.20000000000000000000 +1.20000000000000000000 +1.20000000000000000000 +1.20000000000000000000 +1.20000000000000000000 +1.20000000000000000000 +1.20000000000000000000 +0.00000000012000000000 +0.00000000012000000000 +0.00000000012000000000 +0.00000000012000000000 +0.00000000012000000000 +0.00000000012000000000 +0.00000000012000000000 +0.00000000012000000000 +0.00000000012000000000 +0.00000000012000000000 +0.00000000012000000000 +0.00000000012000000000 +0.00000000012000000000 +0.00000000012000000000 +0.00000000012000000000 +0.00000000012000000000 +0.00000000012000000000 +0.00000000012000000000 +0.00000000012000000000 +0.00000000012000000000 +0.00000000012000000000 +0.00000000012000000000 +0.00000000012000000000 +0.00000000012000000000 +0.00000000012000000000 +0.00000000012000000000 +0.00000000012000000000 +0.00000000012000000000 +0.00000000012000000000 +0.00000000012000000000 diff --git a/testcase/KB/INIT_NWM_KB_FABM/INIT.Z5_n b/testcase/KB/INIT_NWM_KB_FABM/INIT.Z5_n new file mode 100644 index 00000000..15192773 --- /dev/null +++ b/testcase/KB/INIT_NWM_KB_FABM/INIT.Z5_n @@ -0,0 +1,43 @@ +0.01492537313432840000 +0.01492537313432840000 +0.01492537313432840000 +0.01492537313432840000 +0.01492537313432840000 +0.01492537313432840000 +0.01492537313432840000 +0.01492537313432840000 +0.01492537313432840000 +0.01492537313432840000 +0.01492537313432840000 +0.01492537313432840000 +0.01492537313432840000 +0.00000000000149253731 +0.00000000000149253731 +0.00000000000149253731 +0.00000000000149253731 +0.00000000000149253731 +0.00000000000149253731 +0.00000000000149253731 +0.00000000000149253731 +0.00000000000149253731 +0.00000000000149253731 +0.00000000000149253731 +0.00000000000149253731 +0.00000000000149253731 +0.00000000000149253731 +0.00000000000149253731 +0.00000000000149253731 +0.00000000000149253731 +0.00000000000149253731 +0.00000000000149253731 +0.00000000000149253731 +0.00000000000149253731 +0.00000000000149253731 +0.00000000000149253731 +0.00000000000149253731 +0.00000000000149253731 +0.00000000000149253731 +0.00000000000149253731 +0.00000000000149253731 +0.00000000000149253731 +0.00000000000149253731 diff --git a/testcase/KB/INIT_NWM_KB_FABM/INIT.Z5_p b/testcase/KB/INIT_NWM_KB_FABM/INIT.Z5_p new file mode 100644 index 00000000..868ce111 --- /dev/null +++ b/testcase/KB/INIT_NWM_KB_FABM/INIT.Z5_p @@ -0,0 +1,43 @@ +0.00094339622641509400 +0.00094339622641509400 +0.00094339622641509400 +0.00094339622641509400 +0.00094339622641509400 +0.00094339622641509400 +0.00094339622641509400 +0.00094339622641509400 +0.00094339622641509400 +0.00094339622641509400 +0.00094339622641509400 +0.00094339622641509400 +0.00094339622641509400 +0.00000000000009433962 +0.00000000000009433962 +0.00000000000009433962 +0.00000000000009433962 +0.00000000000009433962 +0.00000000000009433962 +0.00000000000009433962 +0.00000000000009433962 +0.00000000000009433962 +0.00000000000009433962 +0.00000000000009433962 +0.00000000000009433962 +0.00000000000009433962 +0.00000000000009433962 +0.00000000000009433962 +0.00000000000009433962 +0.00000000000009433962 +0.00000000000009433962 +0.00000000000009433962 +0.00000000000009433962 +0.00000000000009433962 +0.00000000000009433962 +0.00000000000009433962 +0.00000000000009433962 +0.00000000000009433962 +0.00000000000009433962 +0.00000000000009433962 +0.00000000000009433962 +0.00000000000009433962 +0.00000000000009433962 diff --git a/testcase/KB/INIT_NWM_KB_FABM/INIT.Z6_c b/testcase/KB/INIT_NWM_KB_FABM/INIT.Z6_c new file mode 100644 index 00000000..399fb79a --- /dev/null +++ b/testcase/KB/INIT_NWM_KB_FABM/INIT.Z6_c @@ -0,0 +1,43 @@ +1.20000000000000000000 +1.20000000000000000000 +1.20000000000000000000 +1.20000000000000000000 +1.20000000000000000000 +1.20000000000000000000 +1.20000000000000000000 +1.20000000000000000000 +1.20000000000000000000 +1.20000000000000000000 +1.20000000000000000000 +1.20000000000000000000 +1.20000000000000000000 +0.00000000012000000000 +0.00000000012000000000 +0.00000000012000000000 +0.00000000012000000000 +0.00000000012000000000 +0.00000000012000000000 +0.00000000012000000000 +0.00000000012000000000 +0.00000000012000000000 +0.00000000012000000000 +0.00000000012000000000 +0.00000000012000000000 +0.00000000012000000000 +0.00000000012000000000 +0.00000000012000000000 +0.00000000012000000000 +0.00000000012000000000 +0.00000000012000000000 +0.00000000012000000000 +0.00000000012000000000 +0.00000000012000000000 +0.00000000012000000000 +0.00000000012000000000 +0.00000000012000000000 +0.00000000012000000000 +0.00000000012000000000 +0.00000000012000000000 +0.00000000012000000000 +0.00000000012000000000 +0.00000000012000000000 diff --git a/testcase/KB/INIT_NWM_KB_FABM/INIT.Z6_n b/testcase/KB/INIT_NWM_KB_FABM/INIT.Z6_n new file mode 100644 index 00000000..15192773 --- /dev/null +++ b/testcase/KB/INIT_NWM_KB_FABM/INIT.Z6_n @@ -0,0 +1,43 @@ +0.01492537313432840000 +0.01492537313432840000 +0.01492537313432840000 +0.01492537313432840000 +0.01492537313432840000 +0.01492537313432840000 +0.01492537313432840000 +0.01492537313432840000 +0.01492537313432840000 +0.01492537313432840000 +0.01492537313432840000 +0.01492537313432840000 +0.01492537313432840000 +0.00000000000149253731 +0.00000000000149253731 +0.00000000000149253731 +0.00000000000149253731 +0.00000000000149253731 +0.00000000000149253731 +0.00000000000149253731 +0.00000000000149253731 +0.00000000000149253731 +0.00000000000149253731 +0.00000000000149253731 +0.00000000000149253731 +0.00000000000149253731 +0.00000000000149253731 +0.00000000000149253731 +0.00000000000149253731 +0.00000000000149253731 +0.00000000000149253731 +0.00000000000149253731 +0.00000000000149253731 +0.00000000000149253731 +0.00000000000149253731 +0.00000000000149253731 +0.00000000000149253731 +0.00000000000149253731 +0.00000000000149253731 +0.00000000000149253731 +0.00000000000149253731 +0.00000000000149253731 +0.00000000000149253731 diff --git a/testcase/KB/INIT_NWM_KB_FABM/INIT.Z6_p b/testcase/KB/INIT_NWM_KB_FABM/INIT.Z6_p new file mode 100644 index 00000000..868ce111 --- /dev/null +++ b/testcase/KB/INIT_NWM_KB_FABM/INIT.Z6_p @@ -0,0 +1,43 @@ +0.00094339622641509400 +0.00094339622641509400 +0.00094339622641509400 +0.00094339622641509400 +0.00094339622641509400 +0.00094339622641509400 +0.00094339622641509400 +0.00094339622641509400 +0.00094339622641509400 +0.00094339622641509400 +0.00094339622641509400 +0.00094339622641509400 +0.00094339622641509400 +0.00000000000009433962 +0.00000000000009433962 +0.00000000000009433962 +0.00000000000009433962 +0.00000000000009433962 +0.00000000000009433962 +0.00000000000009433962 +0.00000000000009433962 +0.00000000000009433962 +0.00000000000009433962 +0.00000000000009433962 +0.00000000000009433962 +0.00000000000009433962 +0.00000000000009433962 +0.00000000000009433962 +0.00000000000009433962 +0.00000000000009433962 +0.00000000000009433962 +0.00000000000009433962 +0.00000000000009433962 +0.00000000000009433962 +0.00000000000009433962 +0.00000000000009433962 +0.00000000000009433962 +0.00000000000009433962 +0.00000000000009433962 +0.00000000000009433962 +0.00000000000009433962 +0.00000000000009433962 +0.00000000000009433962 diff --git a/testcase/KB/INIT_NWM_KB_FABM/INIT.depth b/testcase/KB/INIT_NWM_KB_FABM/INIT.depth new file mode 100644 index 00000000..c50ab8b6 --- /dev/null +++ b/testcase/KB/INIT_NWM_KB_FABM/INIT.depth @@ -0,0 +1,43 @@ +3.13000000000000000000 +9.76578000000000000000 +17.01680000000000000000 +25.08890000000000000000 +34.14730000000000000000 +44.39130000000000000000 +56.05700000000000000000 +69.42430000000000000000 +84.82570000000000000000 +102.65000000000000000000 +123.35500000000000000000 +147.46800000000000000000 +175.60100000000000000000 +208.44800000000000000000 +246.79400000000000000000 +291.50900000000000000000 +343.54500000000000000000 +403.91700000000000000000 +464.56500000000000000000 +535.20400000000000000000 +613.80500000000000000000 +700.73400000000000000000 +796.25600000000000000000 +900.51600000000000000000 +1013.53000000000000000000 +1135.20000000000000000000 +1265.28000000000000000000 +1403.44000000000000000000 +1549.25000000000000000000 +1702.20000000000000000000 +1861.76000000000000000000 +2027.35000000000000000000 +2198.40000000000000000000 +2374.33000000000000000000 +2554.60000000000000000000 +2738.70000000000000000000 +2926.16000000000000000000 +3116.54000000000000000000 +3309.46000000000000000000 +3504.57000000000000000000 +3701.56000000000000000000 +3900.17000000000000000000 +4100.16259800000000000000 diff --git a/testcase/Main_create_TEST.py b/testcase/Main_create_TEST.py index 7a724101..d4921684 100755 --- a/testcase/Main_create_TEST.py +++ b/testcase/Main_create_TEST.py @@ -46,6 +46,8 @@ for test in TEST_LIST: print(test['Dir']) + print('---------BGC Framework Used---------') + print(test['BGC_TYPE']) DA.create_dataset(test) diff --git a/testcase/create_init_nc.py b/testcase/create_init_nc.py index e224d5ad..14c524e8 100644 --- a/testcase/create_init_nc.py +++ b/testcase/create_init_nc.py @@ -12,17 +12,32 @@ def create_init_nc(test): - CODEPATH = test['Code'].decode() + "/ogstm/" - CODEPATH = CODEPATH.replace("~",os.getenv("HOME")) - filename = CODEPATH + "ready_for_model_namelists/namelist.passivetrc" - NAMELIST =file2stringlist(filename) - initVARS=[] - for line in NAMELIST: - if line.find("ctrcnm") != -1: - quote_1=line.find("\"") - quote_2=line.find("\"",quote_1+1) - varname=line[quote_1+1:quote_2] - initVARS.append(varname) + if test['BGC_TYPE'].decode() in ['DEFAULT','Default','default','BFM','bfm']: + CODEPATH = test['Code'].decode() + "/ogstm/" + CODEPATH = CODEPATH.replace("~",os.getenv("HOME")) + filename = CODEPATH + "ready_for_model_namelists/namelist.passivetrc" + NAMELIST =file2stringlist(filename) + initVARS=[] + for line in NAMELIST: + if line.find("ctrcnm") != -1: + quote_1=line.find("\"") + quote_2=line.find("\"",quote_1+1) + varname=line[quote_1+1:quote_2] + initVARS.append(varname) + elif test['BGC_TYPE'].decode() in ['FABM','fabm']: + import pyfabm + CODEPATH = test['Code'].decode() + CODEPATH = CODEPATH.replace("~",os.getenv("HOME")) + fabm_yaml= CODEPATH + "/fabm/extern/ogs/fabm_multispectral_2xDetritus.yaml " + model = pyfabm.Model(fabm_yaml) + initVARS=[] + for variable in model.state_variables: + print(f" {variable.name} = {variable.long_name} ({variable.units})") + initVARS.append(variable.name) + else: + + print("BGC_TYPE " + test['BGC_TYPE'].decode() + "wrong/undefined choose within [DEFAULT[Default,default], BFM[bfm], FABM[fabm]]") + sys.exit() jpi=test['jpi']; jpj=test['jpj']; @@ -52,7 +67,16 @@ def create_init_nc(test): os.system("mkdir -p " + test['Dir'].decode() + "/FLUXES/") for var in initVARS: - filename = "KB/INIT_NWM_KB/init." + var + + if test['BGC_TYPE'].decode() in ['DEFAULT','Default','default','BFM','bfm']: + filename = "KB/INIT_NWM_KB/init." + var + elif test['BGC_TYPE'].decode() in ['FABM','fabm']: + var=var.replace('/','_') + filename = "KB/INIT_NWM_KB_FABM/INIT." + var + else: + print("BGC_TYPE " + test['BGC_TYPE'].decode() + "wrong/undefined choose within [DEFAULT[Default,default], BFM[bfm], FABM[fabm]]") + sys.exit() + din = np.loadtxt(filename) datain = interpolate(din, jpk) for jk in range(jpk): diff --git a/testcase/deploy_code.py b/testcase/deploy_code.py index 6e305541..4833decd 100644 --- a/testcase/deploy_code.py +++ b/testcase/deploy_code.py @@ -39,6 +39,13 @@ def deploy_code(test): elif test['BGC_TYPE'].decode() in ['FABM','fabm']: os.system("cp -pf namelist.init.fabm " + test['Dir'].decode() + "/namelist.init") + + namelist_optics = CODEPATH + "/ogstm/ready_for_model_namelists/namelist.optics " + os.system("cp -pf " + namelist_optics + test['Dir'].decode() + "/") + + namelist_phys = CODEPATH + "/ogstm/ready_for_model_namelists/namelist.phys " + os.system("cp -pf " + namelist_phys + test['Dir'].decode() + "/") + fabm_yaml= CODEPATH + "/fabm/extern/ogs/fabm_multispectral_2xDetritus.yaml " os.system("cp -pf " + fabm_yaml + test['Dir'].decode() + "/fabm.yaml") From a55726d935b08a1937e3b40859d77642ca4ca684 Mon Sep 17 00:00:00 2001 From: Paolo Lazzari Date: Mon, 26 Jan 2026 12:36:11 +0100 Subject: [PATCH 28/97] correct not ifdef with propoer syntax --- src/BIO/trclec.f90 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/BIO/trclec.f90 b/src/BIO/trclec.f90 index 33cea9cf..7d03be26 100644 --- a/src/BIO/trclec.f90 +++ b/src/BIO/trclec.f90 @@ -110,7 +110,7 @@ SUBROUTINE trclec ENDIF !----------------------- READING PASSIVE TRACERS NAMELIST -#ifndef key_trc_fabm +#if !defined(key_trc_fabm) OPEN(unit=numnat, file='namelist.passivetrc', status= 'OLD') !'FORMATTED', 'SEQUENTIAL') ! ***** namelist nattrc STATE VARIABLES: From c4309e3f162e465b79a7570109446068a19f223c Mon Sep 17 00:00:00 2001 From: Paolo Lazzari Date: Mon, 26 Jan 2026 12:37:20 +0100 Subject: [PATCH 29/97] allow for greater lenght of restart filenames and variables specification them. --- src/IO/trcrst.f90 | 4 ++-- src/IO/trcwri.f90 | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/IO/trcrst.f90 b/src/IO/trcrst.f90 index 4e3baa29..ea18cc0f 100644 --- a/src/IO/trcrst.f90 +++ b/src/IO/trcrst.f90 @@ -22,7 +22,7 @@ SUBROUTINE trcrst ! local declarations ! ================== INTEGER jn, jn_high - CHARACTER(LEN=37) filename + CHARACTER(LEN=100) filename CHARACTER(LEN=100) bkpname logical existFile logical bkp1hasbeenread,bkp2hasbeenread @@ -49,7 +49,7 @@ SUBROUTINE trcrst filename = 'RESTARTS/RST.'//DateStart//'.'//trim(ctrcnm(jn))// & '.nc' - CALL readnc_slice_double(filename, 'TRN'//trim(ctrcnm(jn)), trn(:,:,:,jn) ) + CALL readnc_slice_double(trim(filename), 'TRN'//trim(ctrcnm(jn)), trn(:,:,:,jn) ) diff --git a/src/IO/trcwri.f90 b/src/IO/trcwri.f90 index c5ff89e5..b8bc35d2 100644 --- a/src/IO/trcwri.f90 +++ b/src/IO/trcwri.f90 @@ -26,9 +26,9 @@ SUBROUTINE trcwri(datestring) double precision julian - CHARACTER(LEN=37) filename + CHARACTER(LEN=100) filename - CHARACTER(LEN=3) varname + CHARACTER(LEN=20) varname INTEGER idrank, ierr, istart, jstart, iPe, iPd, jPe, jPd, status(MPI_STATUS_SIZE) INTEGER irange, jrange @@ -121,7 +121,7 @@ SUBROUTINE trcwri(datestring) filename = 'RESTARTS/RST.'//datestring//'.'//trim(var_to_store)//'.nc' - CALL write_restart(filename,var_to_store,julian, deflate_rst, deflate_level_rst) + CALL write_restart(trim(filename),var_to_store,julian, deflate_rst, deflate_level_rst) END IF END IF From e8eb10a7468c3d562315801730a551915b0951a5 Mon Sep 17 00:00:00 2001 From: Paolo Lazzari Date: Tue, 27 Jan 2026 12:06:15 +0100 Subject: [PATCH 30/97] include variable naming of FABM-BFM --- testcase/create_bc_nc.py | 62 ++++++++++++++++++++++++++++++---------- 1 file changed, 47 insertions(+), 15 deletions(-) diff --git a/testcase/create_bc_nc.py b/testcase/create_bc_nc.py index 3abea4af..0a11586d 100644 --- a/testcase/create_bc_nc.py +++ b/testcase/create_bc_nc.py @@ -67,13 +67,25 @@ def create_bc_nc(test): ncvar = ncOUT.createVariable('nav_lat' ,'f',('y','x') ); ncvar[:] = Lat; ncvar = ncOUT.createVariable('nav_lev' ,'f',('z',) ); ncvar[:] = gdept; - ncvar = ncOUT.createVariable('reN1p' ,'d',('time','z','y','x') ); ncvar[:] = D3*0.; - ncvar = ncOUT.createVariable('reN3n' ,'d',('time','z','y','x') ); ncvar[:] = D3*0.; - ncvar = ncOUT.createVariable('reO2o' ,'d',('time','z','y','x') ); ncvar[:] = D3*0.; - ncvar = ncOUT.createVariable('reN5s' ,'d',('time','z','y','x') ); ncvar[:] = D3*0.; - ncvar = ncOUT.createVariable('reO3c' ,'d',('time','z','y','x') ); ncvar[:] = D3*0.; - ncvar = ncOUT.createVariable('reO3h' ,'d',('time','z','y','x') ); ncvar[:] = D3*0.; - ncvar = ncOUT.createVariable('reN6r' ,'d',('time','z','y','x') ); ncvar[:] = D3*0.; + if test['BGC_TYPE'].decode() in ['DEFAULT','Default','default','BFM','bfm']: + ncvar = ncOUT.createVariable('reN1p' ,'d',('time','z','y','x') ); ncvar[:] = D3*0.; + ncvar = ncOUT.createVariable('reN3n' ,'d',('time','z','y','x') ); ncvar[:] = D3*0.; + ncvar = ncOUT.createVariable('reO2o' ,'d',('time','z','y','x') ); ncvar[:] = D3*0.; + ncvar = ncOUT.createVariable('reN5s' ,'d',('time','z','y','x') ); ncvar[:] = D3*0.; + ncvar = ncOUT.createVariable('reO3c' ,'d',('time','z','y','x') ); ncvar[:] = D3*0.; + ncvar = ncOUT.createVariable('reO3h' ,'d',('time','z','y','x') ); ncvar[:] = D3*0.; + ncvar = ncOUT.createVariable('reN6r' ,'d',('time','z','y','x') ); ncvar[:] = D3*0.; + elif test['BGC_TYPE'].decode() in ['FABM','fabm']: + ncvar = ncOUT.createVariable('reN1_p' ,'d',('time','z','y','x') ); ncvar[:] = D3*0.; + ncvar = ncOUT.createVariable('reN3_n' ,'d',('time','z','y','x') ); ncvar[:] = D3*0.; + ncvar = ncOUT.createVariable('reO2_o' ,'d',('time','z','y','x') ); ncvar[:] = D3*0.; + ncvar = ncOUT.createVariable('reN5_s' ,'d',('time','z','y','x') ); ncvar[:] = D3*0.; + ncvar = ncOUT.createVariable('reO3_c' ,'d',('time','z','y','x') ); ncvar[:] = D3*0.; + ncvar = ncOUT.createVariable('reO3h_h' ,'d',('time','z','y','x') ); ncvar[:] = D3*0.; + ncvar = ncOUT.createVariable('reN6_r' ,'d',('time','z','y','x') ); ncvar[:] = D3*0.; + else: + print("BGC_TYPE " + test['BGC_TYPE'].decode() + "wrong/undefined choose within [DEFAULT[Default,default], BFM[bfm], FABM[fabm]]") + sys.exit() ncvar = ncOUT.createVariable('index' ,'i',('time','z','y','x') ); ncvar[:] = index; ncvar = ncOUT.createVariable('index_inv' ,'i',('waterpoints','dim3')); ncvar[:] = index_inv; @@ -117,8 +129,15 @@ def create_bc_nc(test): ncOUT.createDimension('lon' ,jpi); ncOUT.createDimension('lat' ,jpj); - ncvar = ncOUT.createVariable('atm_N1p' ,'f',('lat','lon') ); ncvar[:] = 3.75866672509673e-09; - ncvar = ncOUT.createVariable('atm_N3n' ,'f',('lat','lon') ); ncvar[:] = 2.24183651189621e-07; + if test['BGC_TYPE'].decode() in ['DEFAULT','Default','default','BFM','bfm']: + ncvar = ncOUT.createVariable('atm_N1p' ,'f',('lat','lon') ); ncvar[:] = 3.75866672509673e-09; + ncvar = ncOUT.createVariable('atm_N3n' ,'f',('lat','lon') ); ncvar[:] = 2.24183651189621e-07; + elif test['BGC_TYPE'].decode() in ['FABM','fabm']: + ncvar = ncOUT.createVariable('atm_N1_p' ,'f',('lat','lon') ); ncvar[:] = 3.75866672509673e-09; + ncvar = ncOUT.createVariable('atm_N3_n' ,'f',('lat','lon') ); ncvar[:] = 2.24183651189621e-07; + else: + print("BGC_TYPE " + test['BGC_TYPE'].decode() + "wrong/undefined choose within [DEFAULT[Default,default], BFM[bfm], FABM[fabm]]") + sys.exit() ncOUT.close() @@ -198,12 +217,25 @@ def create_bc_nc(test): ncOUT.createDimension('riv_idxt' ,tin_idxt); ncvar = ncOUT.createVariable('riv_idxt' ,'i',('riv_idxt',) ); ncvar[:] = riv_index; - ncvar = ncOUT.createVariable('riv_N1p' ,'d',('riv_idxt',) ); ncvar[:] = riv_N1p; - ncvar = ncOUT.createVariable('riv_N3n' ,'d',('riv_idxt',) ); ncvar[:] = riv_N3n; - ncvar = ncOUT.createVariable('riv_N5s' ,'d',('riv_idxt',) ); ncvar[:] = riv_N5s; - ncvar = ncOUT.createVariable('riv_O3c' ,'d',('riv_idxt',) ); ncvar[:] = riv_O3c; - ncvar = ncOUT.createVariable('riv_O3h' ,'d',('riv_idxt',) ); ncvar[:] = riv_O3h; - ncvar = ncOUT.createVariable('riv_O2o' ,'d',('riv_idxt',) ); ncvar[:] = riv_O2o; + + if test['BGC_TYPE'].decode() in ['DEFAULT','Default','default','BFM','bfm']: + ncvar = ncOUT.createVariable('riv_N1p' ,'d',('riv_idxt',) ); ncvar[:] = riv_N1p; + ncvar = ncOUT.createVariable('riv_N3n' ,'d',('riv_idxt',) ); ncvar[:] = riv_N3n; + ncvar = ncOUT.createVariable('riv_N5s' ,'d',('riv_idxt',) ); ncvar[:] = riv_N5s; + ncvar = ncOUT.createVariable('riv_O3c' ,'d',('riv_idxt',) ); ncvar[:] = riv_O3c; + ncvar = ncOUT.createVariable('riv_O3h' ,'d',('riv_idxt',) ); ncvar[:] = riv_O3h; + ncvar = ncOUT.createVariable('riv_O2o' ,'d',('riv_idxt',) ); ncvar[:] = riv_O2o; + elif test['BGC_TYPE'].decode() in ['FABM','fabm']: + ncvar = ncOUT.createVariable('riv_N1_p' ,'d',('riv_idxt',) ); ncvar[:] = riv_N1p; + ncvar = ncOUT.createVariable('riv_N3_n' ,'d',('riv_idxt',) ); ncvar[:] = riv_N3n; + ncvar = ncOUT.createVariable('riv_N5_s' ,'d',('riv_idxt',) ); ncvar[:] = riv_N5s; + ncvar = ncOUT.createVariable('riv_O3_c' ,'d',('riv_idxt',) ); ncvar[:] = riv_O3c; + ncvar = ncOUT.createVariable('riv_O3h_h' ,'d',('riv_idxt',) ); ncvar[:] = riv_O3h; + ncvar = ncOUT.createVariable('riv_O2_o' ,'d',('riv_idxt',) ); ncvar[:] = riv_O2o; + else: + print("BGC_TYPE " + test['BGC_TYPE'].decode() + "wrong/undefined choose within [DEFAULT[Default,default], BFM[bfm], FABM[fabm]]") + sys.exit() + ncOUT.close() # GIB From 9dd5086cada46d4feb61af87a9d86a253d60bd3b Mon Sep 17 00:00:00 2001 From: Paolo Lazzari Date: Tue, 27 Jan 2026 12:07:36 +0100 Subject: [PATCH 31/97] hardcode relaxation variables --> need to be implemented better to adapt to FABM,extend files and variables naming to allow for larger strings --- src/IO/BC_mem.f90 | 13 +++++++++++++ src/IO/bc_atm.f90 | 4 ++-- src/IO/domrea.f90 | 22 +++++++++++++++++++--- 3 files changed, 34 insertions(+), 5 deletions(-) diff --git a/src/IO/BC_mem.f90 b/src/IO/BC_mem.f90 index 2a254076..835f47eb 100644 --- a/src/IO/BC_mem.f90 +++ b/src/IO/BC_mem.f90 @@ -191,6 +191,19 @@ SUBROUTINE alloc_DTATRC #elif key_trc_fabm +! to be emebedded within FABM directive as external forcing +! N1/p = phosphorus (mmol P/m^3) +! N3/n = nitrogen (mmol N/m^3) +! N4/n = nitrogen (mmol N/m^3) +! N5/s = silicate (mmol Si/m^3) +! N6/r = mmol Eq (mmol/Eq/m^3) +! ... +! ... +! ... + + tra_matrix_atm(1) = 1 ! phosphates + tra_matrix_atm(2) = 2 ! nitrates + #else tra_matrix_atm(1) = ppDEFAULT1 diff --git a/src/IO/bc_atm.f90 b/src/IO/bc_atm.f90 index 9291586a..b19d38f9 100644 --- a/src/IO/bc_atm.f90 +++ b/src/IO/bc_atm.f90 @@ -93,7 +93,7 @@ SUBROUTINE LOAD_ATM(datestring) CHARACTER(LEN=17), INTENT(IN) :: datestring ! local - character(LEN=7) :: nomevar + character(LEN=100) :: nomevar character(LEN=27) :: nomefile INTEGER(4) jn,jv,j,i double precision,allocatable,dimension(:,:) :: M1 @@ -112,7 +112,7 @@ SUBROUTINE LOAD_ATM(datestring) M1 = 0 nomevar = 'atm_'//ctrcnm(tra_matrix_atm(jn)) !CALL ioogsnc_bc_1d2(nomefile,nomevar,Asizeglo,atm_aux) - call readnc_slice_float_2d(nomefile,nomevar,M1,0) + call readnc_slice_float_2d(nomefile,trim(nomevar),M1,0) !CALL readnc_double_1d(nomefile,nomevar, Asizeglo,atm_aux) DO i=1,jpi diff --git a/src/IO/domrea.f90 b/src/IO/domrea.f90 index 6e6eda32..3130ac8b 100644 --- a/src/IO/domrea.f90 +++ b/src/IO/domrea.f90 @@ -49,8 +49,8 @@ SUBROUTINE domrea character(len=10) bfmmask_file CHARACTER(LEN=50) filename - CHARACTER(LEN=3), DIMENSION(7) :: var_nc - CHARACTER(LEN=5) nomevar01 + CHARACTER(LEN=100), DIMENSION(7) :: var_nc + CHARACTER(LEN=100) nomevar01 LOGICAL B ! ------------------- @@ -199,18 +199,34 @@ SUBROUTINE domrea ! Restoration Mask **************** ! resto is kept just to provide compliance with bfmv2, but should be removed with bfmv5 +#ifdef key_trc_bfm var_nc(1) = 'O2o' var_nc(2) = 'N1p' var_nc(3) = 'N3n' var_nc(4) = 'N5s' var_nc(5) = 'O3c' var_nc(6) = 'O3h' +#elif key_trc_fabm + var_nc(1) = 'O2_o' + var_nc(2) = 'N1_p' + var_nc(3) = 'N3_n' + var_nc(4) = 'N5_s' + var_nc(5) = 'O3_c' + var_nc(6) = 'O3h_h' + +#else + +! Default dimensions are included within the file DEFAULT_var_list.h + var_nc(1) = 'O2o' + +#endif + IF (NWATERPOINTS.GT.0) THEN do jn=1,jn_gib nomevar01='re'//var_nc(jn) - call readnc_slice_float('bounmask.nc',nomevar01,resto(:,:,:,jn),0) + call readnc_slice_float('bounmask.nc',trim(nomevar01),resto(:,:,:,jn),0) enddo ELSE From fe50a20deb0a983415f699c5c59a8a7d96bc4c7e Mon Sep 17 00:00:00 2001 From: Paolo Lazzari Date: Wed, 4 Feb 2026 11:32:52 +0100 Subject: [PATCH 32/97] adding module to read ogstm.yaml file, to configure I/O activation and frequency. --- src/BIO/trclec.f90 | 7 + src/General/read_ogstm_yaml.f90 | 320 ++++++++++++++++++++++++++++++++ 2 files changed, 327 insertions(+) create mode 100644 src/General/read_ogstm_yaml.f90 diff --git a/src/BIO/trclec.f90 b/src/BIO/trclec.f90 index 7d03be26..b5d202df 100644 --- a/src/BIO/trclec.f90 +++ b/src/BIO/trclec.f90 @@ -22,7 +22,9 @@ SUBROUTINE trclec USE BIO_mem #ifdef key_trc_fabm USE fabm + USE ogstm_yaml_reader #endif + IMPLICIT NONE !---------------------------------------------------------------------- @@ -30,6 +32,9 @@ SUBROUTINE trclec ! ================== INTEGER ::i, ji +#ifdef key_trc_fabm + type(ConfigYAML) :: cfg +#endif !---------------------------------------------------------------------- ! statement functions @@ -66,6 +71,8 @@ SUBROUTINE trclec ! namelist /NATTRC/ ctrmax, ctr_hf ! namelist /NATTRC_DIAG/ diahf, diaWR ! namelist /NATTRC_DIAG_2d/ diahf_2d ,diaWR_2d + call read_config_yaml("ogstm.yaml", cfg) + call print_config(cfg) #else diff --git a/src/General/read_ogstm_yaml.f90 b/src/General/read_ogstm_yaml.f90 new file mode 100644 index 00000000..14c339b0 --- /dev/null +++ b/src/General/read_ogstm_yaml.f90 @@ -0,0 +1,320 @@ +!=========================================================== +! read_config_yaml_fortran_yaml.f90 +! +! Single-file example for Fortran-YAML (Bolding & Bruggeman) +!=========================================================== + +module ogstm_yaml_reader + use, intrinsic :: iso_fortran_env, only: wp => real64 + use yaml + use yaml_types + implicit none + private + + public :: ConfigYAML + public :: read_config_yaml, print_config + + type :: InteriorStateItem + character(len=:), allocatable :: name + real(wp) :: ctrmax = 0.0_wp + integer :: ctrhf = 0 + integer :: relax = 0 + end type + + type :: InteriorDiagnosticItem + character(len=:), allocatable :: name + integer :: diahf = 0 + integer :: diaWR = 0 + end type + + type :: HorizontalDiagnosticItem + character(len=:), allocatable :: name + integer :: diahf_2d = 0 + integer :: diaWR_2d = 0 + end type + + type :: ConfigYAML + type(InteriorStateItem), allocatable :: interior_state(:) + type(InteriorDiagnosticItem), allocatable :: interior_diagnostic(:) + type(HorizontalDiagnosticItem), allocatable :: horizontal_diagnostic(:) + end type + +contains + + !--------------------------------------------------------- + ! Read YAML file -> ConfigYAML + !--------------------------------------------------------- + subroutine read_config_yaml(filename, cfg) + character(len=*), intent(in) :: filename + type(ConfigYAML), intent(out) :: cfg + + character(error_length) :: err + class(type_node), pointer :: root + class(type_dictionary), pointer :: root_dict + type(type_error), pointer :: e + + err = '' + nullify(e) + + root => parse(filename, unit=100, error=err) + if (err /= '') then + write(*,*) 'PARSE ERROR: ', trim(err) + stop 1 + end if + + ! Root must be a dictionary for your YAML layout + select type (root) + type is (type_dictionary) + root_dict => root + class default + write(*,*) 'ERROR: YAML root is not a dictionary.' + stop 2 + end select + + call read_interior_state(root_dict, cfg%interior_state) + call read_interior_diagnostic(root_dict, cfg%interior_diagnostic) + call read_horizontal_diagnostic(root_dict, cfg%horizontal_diagnostic) + + ! (optional) free tree if your build uses finalize patterns elsewhere + ! call root_dict%finalize() ! only if you manage lifetime explicitly + end subroutine read_config_yaml + + !--------------------------------------------------------- + ! Helpers: check if a key exists in a dictionary + ! (Fortran-YAML stores pairs in a linked list: dict%first%next%...) + !--------------------------------------------------------- + logical function has_key(dict, key) + class(type_dictionary), intent(in) :: dict + character(len=*), intent(in) :: key + type(type_key_value_pair), pointer :: p + has_key = .false. + p => dict%first + do while (associated(p)) + if (trim(p%key) == trim(key)) then + has_key = .true. + return + end if + p => p%next + end do + end function has_key + + integer function dict_size(dict) + class(type_dictionary), intent(in) :: dict + type(type_key_value_pair), pointer :: p + dict_size = 0 + p => dict%first + do while (associated(p)) + dict_size = dict_size + 1 + p => p%next + end do + end function dict_size + + !--------------------------------------------------------- + ! Read section: interior_state + !--------------------------------------------------------- + subroutine read_interior_state(root, arr) + class(type_dictionary), intent(in) :: root + type(InteriorStateItem), allocatable, intent(out) :: arr(:) + + class(type_dictionary), pointer :: sec + class(type_dictionary), pointer :: item + type(type_error), pointer :: e + type(type_key_value_pair), pointer :: p + integer :: n, i + + nullify(e) + + if (.not. has_key(root, "interior_state")) then + allocate(arr(0)) + return + end if + + sec => root%get_dictionary("interior_state", required=.true., error=e) + if (associated(e)) then + write(*,*) "ERROR reading interior_state" + stop 3 + end if + + n = dict_size(sec) + allocate(arr(n)) + + p => sec%first + i = 0 + do while (associated(p)) + i = i + 1 + arr(i)%name = trim(p%key) + + select type (val => p%value) + type is (type_dictionary) + item => val + class default + write(*,*) "ERROR: interior_state.", trim(p%key), " is not a mapping" + stop 4 + end select + + ! get_real/get_integer support defaults (optional) + arr(i)%ctrmax = real(item%get_real("ctrmax", default=0.0_real_kind, error=e), wp) + arr(i)%ctrhf = item%get_integer("ctrhf", default=0, error=e) + arr(i)%relax = item%get_integer("relax", default=0, error=e) + + if (associated(e)) then + write(*,*) "ERROR converting interior_state fields for ", trim(arr(i)%name) + stop 5 + end if + + p => p%next + end do + end subroutine read_interior_state + + !--------------------------------------------------------- + ! Read section: interior_diagnostic + !--------------------------------------------------------- + subroutine read_interior_diagnostic(root, arr) + class(type_dictionary), intent(in) :: root + type(InteriorDiagnosticItem), allocatable, intent(out) :: arr(:) + + class(type_dictionary), pointer :: sec + class(type_dictionary), pointer :: item + type(type_error), pointer :: e + type(type_key_value_pair), pointer :: p + integer :: n, i + + nullify(e) + + if (.not. has_key(root, "interior_diagnostic")) then + allocate(arr(0)) + return + end if + + sec => root%get_dictionary("interior_diagnostic", required=.true., error=e) + if (associated(e)) then + write(*,*) "ERROR reading interior_diagnostic" + stop 6 + end if + + n = dict_size(sec) + allocate(arr(n)) + + p => sec%first + i = 0 + do while (associated(p)) + i = i + 1 + arr(i)%name = trim(p%key) + + select type (val => p%value) + type is (type_dictionary) + item => val + class default + write(*,*) "ERROR: interior_diagnostic.", trim(p%key), " is not a mapping" + stop 7 + end select + + arr(i)%diahf = item%get_integer("diahf", default=0, error=e) + arr(i)%diaWR = item%get_integer("diaWR", default=0, error=e) + + if (associated(e)) then + write(*,*) "ERROR converting interior_diagnostic fields for ", trim(arr(i)%name) + stop 8 + end if + + p => p%next + end do + end subroutine read_interior_diagnostic + + !--------------------------------------------------------- + ! Read section: horizontal_diagnostic + !--------------------------------------------------------- + subroutine read_horizontal_diagnostic(root, arr) + class(type_dictionary), intent(in) :: root + type(HorizontalDiagnosticItem), allocatable, intent(out) :: arr(:) + + class(type_dictionary), pointer :: sec + class(type_dictionary), pointer :: item + type(type_error), pointer :: e + type(type_key_value_pair), pointer :: p + integer :: n, i + + nullify(e) + + if (.not. has_key(root, "horizontal_diagnostic")) then + allocate(arr(0)) + return + end if + + sec => root%get_dictionary("horizontal_diagnostic", required=.true., error=e) + if (associated(e)) then + write(*,*) "ERROR reading horizontal_diagnostic" + stop 9 + end if + + n = dict_size(sec) + allocate(arr(n)) + + p => sec%first + i = 0 + do while (associated(p)) + i = i + 1 + arr(i)%name = trim(p%key) + + select type (val => p%value) + type is (type_dictionary) + item => val + class default + write(*,*) "ERROR: horizontal_diagnostic.", trim(p%key), " is not a mapping" + stop 10 + end select + + arr(i)%diahf_2d = item%get_integer("diahf_2d", default=0, error=e) + arr(i)%diaWR_2d = item%get_integer("diaWR_2d", default=0, error=e) + + if (associated(e)) then + write(*,*) "ERROR converting horizontal_diagnostic fields for ", trim(arr(i)%name) + stop 11 + end if + + p => p%next + end do + end subroutine read_horizontal_diagnostic + + !--------------------------------------------------------- + ! Debug print + !--------------------------------------------------------- + subroutine print_config(cfg) + type(ConfigYAML), intent(in) :: cfg + integer :: i + + write(*,'(a)') "=== interior_state ===" + do i = 1, size(cfg%interior_state) + write(*,'(a)') " - "//trim(cfg%interior_state(i)%name) + write(*,'(a,1x,es12.5)') " ctrmax:", cfg%interior_state(i)%ctrmax + write(*,'(a,1x,i0)') " ctrhf: ", cfg%interior_state(i)%ctrhf + write(*,'(a,1x,i0)') " relax: ", cfg%interior_state(i)%relax + end do + + write(*,'(a)') "=== interior_diagnostic ===" + do i = 1, size(cfg%interior_diagnostic) + write(*,'(a)') " - "//trim(cfg%interior_diagnostic(i)%name) + write(*,'(a,1x,i0)') " diahf:", cfg%interior_diagnostic(i)%diahf + write(*,'(a,1x,i0)') " diaWR:", cfg%interior_diagnostic(i)%diaWR + end do + + write(*,'(a)') "=== horizontal_diagnostic ===" + do i = 1, size(cfg%horizontal_diagnostic) + write(*,'(a)') " - "//trim(cfg%horizontal_diagnostic(i)%name) + write(*,'(a,1x,i0)') " diahf_2d:", cfg%horizontal_diagnostic(i)%diahf_2d + write(*,'(a,1x,i0)') " diaWR_2d:", cfg%horizontal_diagnostic(i)%diaWR_2d + end do + end subroutine print_config + +end module ogstm_yaml_reader + + +!program test_read_yaml +! use config_yaml_reader +! implicit none +! type(ConfigYAML) :: cfg + +! call read_config_yaml("config.yaml", cfg) +! call print_config(cfg) +!end program test_read_yaml + From 1abda786af7861ea540dbe6bfef99f709a011191 Mon Sep 17 00:00:00 2001 From: Paolo Lazzari Date: Wed, 4 Feb 2026 11:33:54 +0100 Subject: [PATCH 33/97] include cmake options to include yaml modules --- cmake/FindYAML.cmake | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 cmake/FindYAML.cmake diff --git a/cmake/FindYAML.cmake b/cmake/FindYAML.cmake new file mode 100644 index 00000000..bc80f9fe --- /dev/null +++ b/cmake/FindYAML.cmake @@ -0,0 +1,12 @@ +# - Find FABM +# Find FABM package + + +message("EnvironmentVariableName = ${EnvironmentVariableName}") +find_path (YAML_INCLUDES NAMES yaml.mod yaml_settings.mod yaml_types.mod HINTS $ENV{YAML_INCLUDE} NO_DEFAULT_PATH) +message(STATUS "YAML include = ${YAML_INCLUDES} ") +set (FABM_has_interfaces "YES") + +include (FindPackageHandleStandardArgs) +find_package_handle_standard_args (YAML DEFAULT_MSG FABM_has_interfaces) +mark_as_advanced (YAML_INCLUDES) From 2c1a09f2644d9143c43e393fe4f3402460b10ec8 Mon Sep 17 00:00:00 2001 From: Paolo Lazzari Date: Wed, 4 Feb 2026 12:07:54 +0100 Subject: [PATCH 34/97] connect configuration parameter in ogstm.yaml for I/O to operating ones in ogstm, relaxation activation needs to be completed --- src/BIO/trclec.f90 | 58 +++++++++++++++++++++++++++++++++++----------- 1 file changed, 45 insertions(+), 13 deletions(-) diff --git a/src/BIO/trclec.f90 b/src/BIO/trclec.f90 index b5d202df..fd37fee3 100644 --- a/src/BIO/trclec.f90 +++ b/src/BIO/trclec.f90 @@ -31,7 +31,7 @@ SUBROUTINE trclec ! local declarations ! ================== - INTEGER ::i, ji + INTEGER ::i,j, ji #ifdef key_trc_fabm type(ConfigYAML) :: cfg #endif @@ -49,30 +49,62 @@ SUBROUTINE trclec #elif key_trc_fabm + call read_config_yaml("ogstm.yaml", cfg) + call print_config(cfg) + +! Interior state variables features and dump frequency + ctrmax(:) = 100000.0 + ctr_hf(:) = 0 do i = 1, size(model_fabm%interior_state_variables) ctrcnm(i) = model_fabm%interior_state_variables(i)%name ctrcun(i) = model_fabm%interior_state_variables(i)%units + do j = 1, size(cfg%interior_state) + if ( trim(model_fabm%interior_state_variables(i)%name) .EQ. trim(cfg%interior_state(j)%name)) then + write(*,'(a)') " - "//trim(cfg%interior_state(j)%name) + write(*,'(a,1x,es12.5)') " ctrmax:", cfg%interior_state(j)%ctrmax + ctrmax(i)=cfg%interior_state(j)%ctrmax + write(*,'(a,1x,i0)') " ctrhf: ", cfg%interior_state(j)%ctrhf + ctr_hf(i)=cfg%interior_state(j)%ctrhf + write(*,'(a,1x,i0)') " relax: TO BE COMPLETED", cfg%interior_state(j)%relax + endif + end do end do - do i = 1, size(model_fabm%interior_diagnostic_variables) - dianm(i) = model_fabm%interior_diagnostic_variables(i)%name - diaun(i) = model_fabm%interior_diagnostic_variables(i)%units - end do - do i = 1, size(model_fabm%horizontal_diagnostic_variables) - dianm_2d(i) = model_fabm%horizontal_diagnostic_variables(i)%name - diaun_2d(i) = model_fabm%horizontal_diagnostic_variables(i)%units - end do - ctrmax(:) = 100000.0 - ctr_hf(:) = 0 +! Interior diagnostic variables features and dump frequency diahf(:) = 0 diaWR(:) = 1 + do i = 1, size(model_fabm%interior_diagnostic_variables) + dianm(i) = model_fabm%interior_diagnostic_variables(i)%name + diaun(i) = model_fabm%interior_diagnostic_variables(i)%units + do j = 1, size(cfg%interior_diagnostic) + if ( trim(model_fabm%interior_diagnostic_variables(i)%name) .EQ. trim(cfg%interior_diagnostic(j)%name)) then + write(*,'(a)') " - "//trim(cfg%interior_diagnostic(j)%name) + write(*,'(a,1x,i0)') " diahf:", cfg%interior_diagnostic(j)%diahf + diahf(i)=cfg%interior_diagnostic(j)%diahf + write(*,'(a,1x,i0)') " diaWR:", cfg%interior_diagnostic(j)%diaWR + diaWR(i)=cfg%interior_diagnostic(j)%diaWR + endif + end do + end do +! Horizontal diagnostic variables features and dump frequency diahf_2d(:) = 0 diaWR_2d(:) = 1 + do i = 1, size(model_fabm%horizontal_diagnostic_variables) + dianm_2d(i) = model_fabm%horizontal_diagnostic_variables(i)%name + diaun_2d(i) = model_fabm%horizontal_diagnostic_variables(i)%units + do j = 1, size(cfg%horizontal_diagnostic) + if ( trim(model_fabm%horizontal_diagnostic_variables(i)%name) .EQ. trim(cfg%horizontal_diagnostic(j)%name)) then + write(*,'(a)') " - "//trim(cfg%horizontal_diagnostic(j)%name) + write(*,'(a,1x,i0)') " diahf_2d:", cfg%horizontal_diagnostic(j)%diahf_2d + diahf_2d(i)=cfg%horizontal_diagnostic(j)%diahf_2d + write(*,'(a,1x,i0)') " diaWR_2d:", cfg%horizontal_diagnostic(j)%diaWR_2d + diaWR_2d(i)=cfg%horizontal_diagnostic(j)%diaWR_2d + endif + end do + end do ! namelist /NATTRC/ ctrmax, ctr_hf ! namelist /NATTRC_DIAG/ diahf, diaWR ! namelist /NATTRC_DIAG_2d/ diahf_2d ,diaWR_2d - call read_config_yaml("ogstm.yaml", cfg) - call print_config(cfg) #else From 3c3a6c5cb5a37ea552537ce220281052273c7459 Mon Sep 17 00:00:00 2001 From: Paolo Lazzari Date: Wed, 4 Feb 2026 12:09:51 +0100 Subject: [PATCH 35/97] add yaml directives to CMAKE --- GeneralCmake.cmake | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/GeneralCmake.cmake b/GeneralCmake.cmake index 1a61ec69..dfea44b4 100644 --- a/GeneralCmake.cmake +++ b/GeneralCmake.cmake @@ -10,7 +10,8 @@ set (NETCDF_F90 "YES") find_package(MPI REQUIRED) find_package(NetCDF REQUIRED) #find_package(BFM REQUIRED) -#find_package(FABM REQUIRED) +find_package(FABM REQUIRED) +find_package(YAML REQUIRED) find_package(BIOPTIMOD_3STREAM REQUIRED) find_package(OASIM_ATM) @@ -54,7 +55,8 @@ endif () #include #include_directories(${BFM_INCLUDES}) -#include_directories(${FABM_INCLUDES}) +include_directories(${FABM_INCLUDES}) +include_directories(${YAML_INCLUDES}) include_directories(${BIOPTIMOD_3STREAM_INCLUDES}) include_directories(${OASIM_ATM_INCLUDES}) include_directories(${NETCDF_INCLUDES_C}) From 9d804585fb25a6efe09096c66c09d6726e41277d Mon Sep 17 00:00:00 2001 From: Paolo Lazzari Date: Wed, 4 Feb 2026 12:10:50 +0100 Subject: [PATCH 36/97] set to default no BFM no FABM --- GeneralCmake.cmake | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/GeneralCmake.cmake b/GeneralCmake.cmake index dfea44b4..1e8f917d 100644 --- a/GeneralCmake.cmake +++ b/GeneralCmake.cmake @@ -10,8 +10,8 @@ set (NETCDF_F90 "YES") find_package(MPI REQUIRED) find_package(NetCDF REQUIRED) #find_package(BFM REQUIRED) -find_package(FABM REQUIRED) -find_package(YAML REQUIRED) +#find_package(FABM REQUIRED) +#find_package(YAML REQUIRED) find_package(BIOPTIMOD_3STREAM REQUIRED) find_package(OASIM_ATM) @@ -55,8 +55,8 @@ endif () #include #include_directories(${BFM_INCLUDES}) -include_directories(${FABM_INCLUDES}) -include_directories(${YAML_INCLUDES}) +#include_directories(${FABM_INCLUDES}) +#include_directories(${YAML_INCLUDES}) include_directories(${BIOPTIMOD_3STREAM_INCLUDES}) include_directories(${OASIM_ATM_INCLUDES}) include_directories(${NETCDF_INCLUDES_C}) From cbb90654cbada9be49eeaf3d34f646391732e24b Mon Sep 17 00:00:00 2001 From: Paolo Lazzari Date: Thu, 5 Feb 2026 11:21:20 +0100 Subject: [PATCH 37/97] exclude use of yaml module in default and BFM configurations --- cmake/FindYAML.cmake | 1 + src/General/read_ogstm_yaml.f90 | 2 ++ 2 files changed, 3 insertions(+) diff --git a/cmake/FindYAML.cmake b/cmake/FindYAML.cmake index bc80f9fe..e492a0ef 100644 --- a/cmake/FindYAML.cmake +++ b/cmake/FindYAML.cmake @@ -4,6 +4,7 @@ message("EnvironmentVariableName = ${EnvironmentVariableName}") find_path (YAML_INCLUDES NAMES yaml.mod yaml_settings.mod yaml_types.mod HINTS $ENV{YAML_INCLUDE} NO_DEFAULT_PATH) +add_definitions(-Dkey_yaml ) message(STATUS "YAML include = ${YAML_INCLUDES} ") set (FABM_has_interfaces "YES") diff --git a/src/General/read_ogstm_yaml.f90 b/src/General/read_ogstm_yaml.f90 index 14c339b0..385ec194 100644 --- a/src/General/read_ogstm_yaml.f90 +++ b/src/General/read_ogstm_yaml.f90 @@ -5,6 +5,7 @@ !=========================================================== module ogstm_yaml_reader +#ifdef key_yaml use, intrinsic :: iso_fortran_env, only: wp => real64 use yaml use yaml_types @@ -306,6 +307,7 @@ subroutine print_config(cfg) end do end subroutine print_config +#endif end module ogstm_yaml_reader From 62611ea39afd78ffd7822844dc063919223292b9 Mon Sep 17 00:00:00 2001 From: Paolo Lazzari Date: Thu, 5 Feb 2026 11:45:43 +0100 Subject: [PATCH 38/97] add controls on ogstm.yaml declaration of tracer, need to be consistent with internal fabm variables --- src/BIO/trclec.f90 | 48 ++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 44 insertions(+), 4 deletions(-) diff --git a/src/BIO/trclec.f90 b/src/BIO/trclec.f90 index fd37fee3..a8235418 100644 --- a/src/BIO/trclec.f90 +++ b/src/BIO/trclec.f90 @@ -31,7 +31,8 @@ SUBROUTINE trclec ! local declarations ! ================== - INTEGER ::i,j, ji + INTEGER :: i,j, ji + INTEGER :: nmatch #ifdef key_trc_fabm type(ConfigYAML) :: cfg #endif @@ -58,8 +59,12 @@ SUBROUTINE trclec do i = 1, size(model_fabm%interior_state_variables) ctrcnm(i) = model_fabm%interior_state_variables(i)%name ctrcun(i) = model_fabm%interior_state_variables(i)%units - do j = 1, size(cfg%interior_state) + end do + do j = 1, size(cfg%interior_state) + nmatch = 0 + do i = 1, size(model_fabm%interior_state_variables) if ( trim(model_fabm%interior_state_variables(i)%name) .EQ. trim(cfg%interior_state(j)%name)) then + nmatch = nmatch + 1 write(*,'(a)') " - "//trim(cfg%interior_state(j)%name) write(*,'(a,1x,es12.5)') " ctrmax:", cfg%interior_state(j)%ctrmax ctrmax(i)=cfg%interior_state(j)%ctrmax @@ -68,6 +73,15 @@ SUBROUTINE trclec write(*,'(a,1x,i0)') " relax: TO BE COMPLETED", cfg%interior_state(j)%relax endif end do + if (nmatch == 0) then + write(*,*) "ERROR: variable not found ..." , & + trim(cfg%interior_state(j)%name) + stop 1 + else if (nmatch > 1) then + write(*,*) "ERROR: duplicate FABM variable name: ", & + trim(cfg%interior_state(j)%name) + stop 2 + end if end do ! Interior diagnostic variables features and dump frequency diahf(:) = 0 @@ -75,8 +89,12 @@ SUBROUTINE trclec do i = 1, size(model_fabm%interior_diagnostic_variables) dianm(i) = model_fabm%interior_diagnostic_variables(i)%name diaun(i) = model_fabm%interior_diagnostic_variables(i)%units - do j = 1, size(cfg%interior_diagnostic) + end do + do j = 1, size(cfg%interior_diagnostic) + nmatch = 0 + do i = 1, size(model_fabm%interior_diagnostic_variables) if ( trim(model_fabm%interior_diagnostic_variables(i)%name) .EQ. trim(cfg%interior_diagnostic(j)%name)) then + nmatch = nmatch + 1 write(*,'(a)') " - "//trim(cfg%interior_diagnostic(j)%name) write(*,'(a,1x,i0)') " diahf:", cfg%interior_diagnostic(j)%diahf diahf(i)=cfg%interior_diagnostic(j)%diahf @@ -84,6 +102,15 @@ SUBROUTINE trclec diaWR(i)=cfg%interior_diagnostic(j)%diaWR endif end do + if (nmatch == 0) then + write(*,*) "ERROR: variable not found ..." , & + trim(cfg%interior_diagnostic(j)%name) + stop 1 + else if (nmatch > 1) then + write(*,*) "ERROR: duplicate FABM variable name: ", & + trim(cfg%interior_diagnostic(j)%name) + stop 2 + end if end do ! Horizontal diagnostic variables features and dump frequency diahf_2d(:) = 0 @@ -91,8 +118,12 @@ SUBROUTINE trclec do i = 1, size(model_fabm%horizontal_diagnostic_variables) dianm_2d(i) = model_fabm%horizontal_diagnostic_variables(i)%name diaun_2d(i) = model_fabm%horizontal_diagnostic_variables(i)%units - do j = 1, size(cfg%horizontal_diagnostic) + end do + do j = 1, size(cfg%horizontal_diagnostic) + nmatch = 0 + do i = 1, size(model_fabm%horizontal_diagnostic_variables) if ( trim(model_fabm%horizontal_diagnostic_variables(i)%name) .EQ. trim(cfg%horizontal_diagnostic(j)%name)) then + nmatch = nmatch + 1 write(*,'(a)') " - "//trim(cfg%horizontal_diagnostic(j)%name) write(*,'(a,1x,i0)') " diahf_2d:", cfg%horizontal_diagnostic(j)%diahf_2d diahf_2d(i)=cfg%horizontal_diagnostic(j)%diahf_2d @@ -100,6 +131,15 @@ SUBROUTINE trclec diaWR_2d(i)=cfg%horizontal_diagnostic(j)%diaWR_2d endif end do + if (nmatch == 0) then + write(*,*) "ERROR: variable not found ..." , & + trim(cfg%horizontal_diagnostic(j)%name) + stop 1 + else if (nmatch > 1) then + write(*,*) "ERROR: duplicate FABM variable name: ", & + trim(cfg%horizontal_diagnostic(j)%name) + stop 2 + end if end do ! namelist /NATTRC/ ctrmax, ctr_hf From 341ada779003a428f7b1f885a7f5b9bbf5a1ebf6 Mon Sep 17 00:00:00 2001 From: Paolo Lazzari Date: Thu, 5 Feb 2026 12:11:12 +0100 Subject: [PATCH 39/97] script to create template of ogstm.yaml --- testcase/create_ogstm_yaml.py | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 testcase/create_ogstm_yaml.py diff --git a/testcase/create_ogstm_yaml.py b/testcase/create_ogstm_yaml.py new file mode 100644 index 00000000..7f42577c --- /dev/null +++ b/testcase/create_ogstm_yaml.py @@ -0,0 +1,33 @@ +import os +import pyfabm + +CODEPATH = '/leonardo_work/OGS_test2528_0/plazzari/OGSTM-FABM/ModelBuild/' +CODEPATH = CODEPATH.replace("~",os.getenv("HOME")) +fabm_yaml= CODEPATH + "/fabm/extern/ogs/fabm_multispectral_2xDetritus.yaml " +model = pyfabm.Model(fabm_yaml) + +#interior_state: +# O2_o: +# ctrmax: 1.000000e+03 +# ctrhf: 1 +# relax: 1 + +with open('ogstm.yaml', 'w') as f: + f.write('interior_state:\n') + for variable in model.state_variables: + f.write(f" {variable.name.replace('/','_')}:\n") + f.write(f" ctrmax: 1.000000e+03\n") + f.write(f" ctrhf: 0\n") + f.write(f" relax: 0\n") + + f.write('interior_diagnostic:\n') + for variable in model.interior_diagnostic_variables: + f.write(f" {variable.name.replace('/','_')}:\n") + f.write(f" diahf: 0\n") + f.write(f" diaWR: 0\n") + + f.write('horizontal_diagnostic:\n') + for variable in model.horizontal_diagnostic_variables: + f.write(f" {variable.name.replace('/','_')}:\n") + f.write(f" diahf_2d: 0\n") + f.write(f" diaWR_2d: 0\n") \ No newline at end of file From 6bbae619f2e246eed8b2a32d58bcfeceb4e71be9 Mon Sep 17 00:00:00 2001 From: Paolo Lazzari Date: Tue, 10 Feb 2026 11:13:59 +0100 Subject: [PATCH 40/97] fix path and deployment for ogstm.yaml --- testcase/create_ogstm_yaml.py | 2 +- testcase/deploy_code.py | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/testcase/create_ogstm_yaml.py b/testcase/create_ogstm_yaml.py index 7f42577c..7cf8af76 100644 --- a/testcase/create_ogstm_yaml.py +++ b/testcase/create_ogstm_yaml.py @@ -1,7 +1,7 @@ import os import pyfabm -CODEPATH = '/leonardo_work/OGS_test2528_0/plazzari/OGSTM-FABM/ModelBuild/' +CODEPATH = '../../' CODEPATH = CODEPATH.replace("~",os.getenv("HOME")) fabm_yaml= CODEPATH + "/fabm/extern/ogs/fabm_multispectral_2xDetritus.yaml " model = pyfabm.Model(fabm_yaml) diff --git a/testcase/deploy_code.py b/testcase/deploy_code.py index 4833decd..cc7ef47d 100644 --- a/testcase/deploy_code.py +++ b/testcase/deploy_code.py @@ -48,7 +48,11 @@ def deploy_code(test): fabm_yaml= CODEPATH + "/fabm/extern/ogs/fabm_multispectral_2xDetritus.yaml " os.system("cp -pf " + fabm_yaml + test['Dir'].decode() + "/fabm.yaml") - + try: + os.system("cp -pf ogstm.yaml " + test['Dir'].decode() + "/ogstm.yaml") + except Exception as e: + print("Missing ogstm.yaml:", e) + print("To create a template ogstm.yaml launch python create_ogstm_yaml.py") else: print("BGC_TYPE " + test['BGC_TYPE'].decode() + "wrong/undefined choose within [DEFAULT[Default,default], BFM[bfm], FABM[fabm]]") From d89362dac7e814596839f6b2818589c2789bd543 Mon Sep 17 00:00:00 2001 From: Paolo Lazzari Date: Wed, 11 Feb 2026 11:09:20 +0100 Subject: [PATCH 41/97] define seconds_per_time_unit to prevent error in FABM initialization --- src/BIO/BIO_mem.f90 | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/src/BIO/BIO_mem.f90 b/src/BIO/BIO_mem.f90 index 353a39b2..d759b49f 100644 --- a/src/BIO/BIO_mem.f90 +++ b/src/BIO/BIO_mem.f90 @@ -38,7 +38,7 @@ MODULE BIO_mem subroutine initialize_FABM() ! Provide extents of the spatial domain (number of layers nz for a 1D column) model_fabm => fabm_create_model() - call model_fabm%set_domain(jpk,jpj,jpi) + call model_fabm%set_domain(jpk,jpj,jpi,1.0d0) ! At this point (after the call to fabm_create_model), memory should be ! allocated to hold the values of all size(model%interior_state_variables) state variables. ! Where this memory resides and how it is laid out is typically host-specific. @@ -101,6 +101,30 @@ subroutine myalloc_BIO() do ivar = 1, size(model_fabm%interior_state_variables) call model_fabm%link_interior_state_data(ivar, trn(:,:,:,ivar)) end do + ! Point FABM to environmental data, here shown for temperature + ! Array temp with extents nx,ny,nz is assumed to be allocated. + ! Do this for all variables on FABM's standard variable list that the model can provide. + ! For this list, visit https://fabm.net/standard_variables + + call model_fabm%link_interior_data(fabm_standard_variables%temperature, tn) + call model_fabm%link_interior_data(fabm_standard_variables%practical_salinity, sn) + + ! Complete initialization and check whether FABM has all dependencies fulfilled + ! (i.e., whether all required calls to model%link_*_data have been made) + write(*,*) 'Finalize initialization and check whether FABM has all dependencies fulfilled ...' + call model_fabm%start() + write(*,*) 'done' + + ! Initialize the tracers + ! This sets the values of arrays sent to model%link_interior_state_data, + ! in this case those in interior_state. +! do k = 1, nz +! do j = 1, ny +! call model_fabm%initialize_interior_state(1, nx, j, k) +! end do +! end do + +! At this point, initialization is complete. #endif #ifdef Mem_Monitor From 77965827c112d61065803300a61bf386f76ea8e7 Mon Sep 17 00:00:00 2001 From: Paolo Lazzari Date: Thu, 12 Feb 2026 14:46:38 +0100 Subject: [PATCH 42/97] Dump info about restart files read. --- src/IO/trcrst.f90 | 1 + 1 file changed, 1 insertion(+) diff --git a/src/IO/trcrst.f90 b/src/IO/trcrst.f90 index ea18cc0f..e210f639 100644 --- a/src/IO/trcrst.f90 +++ b/src/IO/trcrst.f90 @@ -49,6 +49,7 @@ SUBROUTINE trcrst filename = 'RESTARTS/RST.'//DateStart//'.'//trim(ctrcnm(jn))// & '.nc' + write(*,*) 'Reading restart file ', filename, 'and variable TRN', trim(ctrcnm(jn)), ' ' CALL readnc_slice_double(trim(filename), 'TRN'//trim(ctrcnm(jn)), trn(:,:,:,jn) ) From c0909e07937d02c3c7708c8f88de8f5324b214a2 Mon Sep 17 00:00:00 2001 From: Paolo Lazzari Date: Thu, 12 Feb 2026 16:11:01 +0100 Subject: [PATCH 43/97] Start including the environmental dependencies required by FABM. --- src/BIO/BIO_mem.f90 | 44 ++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 42 insertions(+), 2 deletions(-) diff --git a/src/BIO/BIO_mem.f90 b/src/BIO/BIO_mem.f90 index d759b49f..eb25d883 100644 --- a/src/BIO/BIO_mem.f90 +++ b/src/BIO/BIO_mem.f90 @@ -6,6 +6,7 @@ MODULE BIO_mem #ifdef key_trc_fabm USE fabm + USE OPT_mem #endif #ifdef Mem_Monitor @@ -61,6 +62,11 @@ subroutine myalloc_BIO() INTEGER :: err INTEGER :: ivar double precision :: aux_mem +#ifdef key_trc_fabm + type (type_fabm_interior_variable_id) :: interior_id + type (type_fabm_horizontal_variable_id) :: horizontal_id + type (type_fabm_scalar_variable_id) :: scalar_id +#endif #ifdef Mem_Monitor aux_mem = get_mem(err) @@ -106,11 +112,45 @@ subroutine myalloc_BIO() ! Do this for all variables on FABM's standard variable list that the model can provide. ! For this list, visit https://fabm.net/standard_variables - call model_fabm%link_interior_data(fabm_standard_variables%temperature, tn) - call model_fabm%link_interior_data(fabm_standard_variables%practical_salinity, sn) + call model_fabm%link_interior_data(fabm_standard_variables%temperature, tn) ! Celsius + call model_fabm%link_interior_data(fabm_standard_variables%practical_salinity, sn) ! PSU + call model_fabm%link_interior_data(fabm_standard_variables%density, rho) ! kg m-3 + call model_fabm%link_interior_data(fabm_standard_variables%pressure, gdept) ! dbar + call model_fabm%link_horizontal_data(fabm_standard_variables%mole_fraction_of_carbon_dioxide_in_air, ogstm_co2) ! CO2 Mixing Ratios (ppm) + call model_fabm%link_interior_data(fabm_standard_variables%depth, gdept ) ! m + call model_fabm%link_interior_data(fabm_standard_variables%cell_thickness, e3t ) ! m + call model_fabm%link_horizontal_data(fabm_standard_variables%wind_speed, vatm) ! m/s + call model_fabm%link_horizontal_data(fabm_standard_variables%longitude, glamt) ! degree_east + call model_fabm%link_horizontal_data(fabm_standard_variables%latitude, gphit) ! degree_north + + horizontal_id = model_fabm%get_horizontal_variable_id('cloud_area_fraction') + call model_fabm%link_horizontal_data(horizontal_id, tcc/100.d0) ! [0-1] + + + horizontal_id = model_fabm%get_horizontal_variable_id('atmosphere_mass_content_of_cloud_liquid_water') + call model_fabm%link_horizontal_data(horizontal_id, tclw) ! [0-1] + +! horizontal_id = model_fabm%get_horizontal_variable_id('atmosphere_mass_content_of_water_vapor') +! call model_fabm%link_horizontal_data(horizontal_id, 0.1d0) ! kg m^-2 + +! horizontal_id = model_fabm%get_horizontal_variable_id('visibility_in_air') +! call model_fabm%link_horizontal_data(horizontal_id, 25000.d0) ! m + +! horizontal_id = model_fabm%get_horizontal_variable_id('aerosol_air_mass_type') +! call model_fabm%link_horizontal_data(horizontal_id, 10.d0) ! - + +! horizontal_id = model_fabm%get_horizontal_variable_id('surface_specific_humidity') +! call model_fabm%link_horizontal_data(horizontal_id, 0.01d0) ! kg kg^-1 + + horizontal_id = model_fabm%get_horizontal_variable_id('surface_temperature') + call model_fabm%link_horizontal_data(horizontal_id, t2m) ! - degree_Celsius + + horizontal_id = model_fabm%get_horizontal_variable_id('surface_air_pressure') + call model_fabm%link_horizontal_data(horizontal_id, sp) ! - Pa ! Complete initialization and check whether FABM has all dependencies fulfilled ! (i.e., whether all required calls to model%link_*_data have been made) + write(*,*) 'Finalize initialization and check whether FABM has all dependencies fulfilled ...' call model_fabm%start() write(*,*) 'done' From 8d8a59f120a2f7bfd0e4aad91e3e8cb12916b807 Mon Sep 17 00:00:00 2001 From: Paolo Lazzari Date: Thu, 12 Feb 2026 16:12:42 +0100 Subject: [PATCH 44/97] set always at least one HF output otherwise create problems all outputs at 10.e-08. --- testcase/create_ogstm_yaml.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/testcase/create_ogstm_yaml.py b/testcase/create_ogstm_yaml.py index 7cf8af76..b2b646f6 100644 --- a/testcase/create_ogstm_yaml.py +++ b/testcase/create_ogstm_yaml.py @@ -14,10 +14,14 @@ with open('ogstm.yaml', 'w') as f: f.write('interior_state:\n') - for variable in model.state_variables: + for i,variable in enumerate(model.state_variables): f.write(f" {variable.name.replace('/','_')}:\n") f.write(f" ctrmax: 1.000000e+03\n") - f.write(f" ctrhf: 0\n") + # OGSTM want always at least an high freq output + if i == 0: + f.write(f" ctrhf: 1\n") + else: + f.write(f" ctrhf: 0\n") f.write(f" relax: 0\n") f.write('interior_diagnostic:\n') @@ -30,4 +34,4 @@ for variable in model.horizontal_diagnostic_variables: f.write(f" {variable.name.replace('/','_')}:\n") f.write(f" diahf_2d: 0\n") - f.write(f" diaWR_2d: 0\n") \ No newline at end of file + f.write(f" diaWR_2d: 0\n") From 09292d91826018c6c7ac3111f1e41b22eda0a433 Mon Sep 17 00:00:00 2001 From: Paolo Lazzari Date: Thu, 12 Feb 2026 16:13:44 +0100 Subject: [PATCH 45/97] Bug fix on double declared variable. --- src/BIO/trcbio_fabm.F90 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/BIO/trcbio_fabm.F90 b/src/BIO/trcbio_fabm.F90 index 1ed43f02..9eaf103c 100644 --- a/src/BIO/trcbio_fabm.F90 +++ b/src/BIO/trcbio_fabm.F90 @@ -65,7 +65,7 @@ SUBROUTINE trcbio_fabm double precision,dimension(jptra,jpk) :: b double precision,dimension(jpk,jptra) :: a double precision,dimension(4,jpk) :: c - double precision,dimension(jptra_dia,jpk) :: d +! double precision,dimension(jptra_dia,jpk) :: d double precision,dimension(jpk,16) :: er double precision,dimension(jptra_dia_2d) :: d2 From be6ca694a6cd1bb5d1b338260ce6e02d72c74ace Mon Sep 17 00:00:00 2001 From: Paolo Lazzari Date: Mon, 16 Feb 2026 15:02:08 +0100 Subject: [PATCH 46/97] Finalize the definition of FABM dependencies. --- src/BIO-OPTICS/OPT_mem.f90 | 23 +++++++++++++++++++++++ src/BIO/BIO_mem.f90 | 31 ++++++++++++++++++++++--------- 2 files changed, 45 insertions(+), 9 deletions(-) diff --git a/src/BIO-OPTICS/OPT_mem.f90 b/src/BIO-OPTICS/OPT_mem.f90 index ae778bfa..dfb8dece 100644 --- a/src/BIO-OPTICS/OPT_mem.f90 +++ b/src/BIO-OPTICS/OPT_mem.f90 @@ -47,6 +47,13 @@ MODULE OPT_mem double precision, allocatable :: taua(:,:,:) double precision, allocatable :: asymp(:,:,:) double precision, allocatable :: ssalb(:,:,:) +! FABM optical model variables + double precision, allocatable :: surface_downwelling_shortwave_flux(:,:) + double precision, allocatable :: atmosphere_mass_content_of_water_vapor(:,:) + double precision, allocatable :: visibility_in_air(:,:) + double precision, allocatable :: aerosol_air_mass_type(:,:) + double precision, allocatable :: surface_specific_humidity(:,:) + ! ############ real, allocatable :: zkef_f (:,:) CHARACTER(LEN=7), allocatable,dimension(:) :: Ednm, Esnm, Eunm @@ -169,6 +176,22 @@ subroutine myalloc_OPT() allocate(taua(33,jpj,jpi)) ; taua=huge(sp(1,1)) allocate(asymp(33,jpj,jpi)); asymp=huge(sp(1,1)) allocate(ssalb(33,jpj,jpi)); ssalb=huge(sp(1,1)) +! FABM optical model variables + allocate(surface_downwelling_shortwave_flux(jpj,jpi)) + surface_downwelling_shortwave_flux=huge(surface_downwelling_shortwave_flux(1,1)) + + allocate(atmosphere_mass_content_of_water_vapor(jpj,jpi)) + atmosphere_mass_content_of_water_vapor=huge(atmosphere_mass_content_of_water_vapor(1,1)) + + allocate(visibility_in_air(jpj,jpi)) + visibility_in_air=huge(visibility_in_air(1,1)) + + allocate(aerosol_air_mass_type(jpj,jpi)) + aerosol_air_mass_type=huge(surface_specific_humidity(1,1)) + + allocate(surface_specific_humidity(jpj,jpi)) + surface_specific_humidity=huge(surface_specific_humidity(1,1)) + allocate(spIO (jpj,jpi,2)) ; spIO =huge(sp(1,1)) allocate(mslIO(jpj,jpi,2)) ; mslIO =huge(sp(1,1)) diff --git a/src/BIO/BIO_mem.f90 b/src/BIO/BIO_mem.f90 index eb25d883..f425c651 100644 --- a/src/BIO/BIO_mem.f90 +++ b/src/BIO/BIO_mem.f90 @@ -65,7 +65,7 @@ subroutine myalloc_BIO() #ifdef key_trc_fabm type (type_fabm_interior_variable_id) :: interior_id type (type_fabm_horizontal_variable_id) :: horizontal_id - type (type_fabm_scalar_variable_id) :: scalar_id + type (type_fabm_scalar_variable_id) :: scalar_id,id_yearday #endif #ifdef Mem_Monitor @@ -130,17 +130,26 @@ subroutine myalloc_BIO() horizontal_id = model_fabm%get_horizontal_variable_id('atmosphere_mass_content_of_cloud_liquid_water') call model_fabm%link_horizontal_data(horizontal_id, tclw) ! [0-1] -! horizontal_id = model_fabm%get_horizontal_variable_id('atmosphere_mass_content_of_water_vapor') -! call model_fabm%link_horizontal_data(horizontal_id, 0.1d0) ! kg m^-2 -! horizontal_id = model_fabm%get_horizontal_variable_id('visibility_in_air') -! call model_fabm%link_horizontal_data(horizontal_id, 25000.d0) ! m + horizontal_id=model_fabm%get_horizontal_variable_id('surface_downwelling_shortwave_flux') + ! to be provided in case monospectral formulation is used + call model_fabm%link_horizontal_data(horizontal_id, surface_downwelling_shortwave_flux) ! W m^-2 -! horizontal_id = model_fabm%get_horizontal_variable_id('aerosol_air_mass_type') -! call model_fabm%link_horizontal_data(horizontal_id, 10.d0) ! - + horizontal_id = model_fabm%get_horizontal_variable_id('atmosphere_mass_content_of_water_vapor') + atmosphere_mass_content_of_water_vapor=0.1d0 + call model_fabm%link_horizontal_data(horizontal_id, atmosphere_mass_content_of_water_vapor) ! kg m^-2 -! horizontal_id = model_fabm%get_horizontal_variable_id('surface_specific_humidity') -! call model_fabm%link_horizontal_data(horizontal_id, 0.01d0) ! kg kg^-1 + horizontal_id = model_fabm%get_horizontal_variable_id('visibility_in_air') + visibility_in_air = 25000.d0 + call model_fabm%link_horizontal_data(horizontal_id, visibility_in_air) ! m + + horizontal_id = model_fabm%get_horizontal_variable_id('aerosol_air_mass_type') + aerosol_air_mass_type = 10.d0 + call model_fabm%link_horizontal_data(horizontal_id, aerosol_air_mass_type) ! - + + horizontal_id = model_fabm%get_horizontal_variable_id('surface_specific_humidity') + surface_specific_humidity = 0.01d0 + call model_fabm%link_horizontal_data(horizontal_id, surface_specific_humidity) ! kg kg^-1 horizontal_id = model_fabm%get_horizontal_variable_id('surface_temperature') call model_fabm%link_horizontal_data(horizontal_id, t2m) ! - degree_Celsius @@ -148,6 +157,10 @@ subroutine myalloc_BIO() horizontal_id = model_fabm%get_horizontal_variable_id('surface_air_pressure') call model_fabm%link_horizontal_data(horizontal_id, sp) ! - Pa + id_yearday = model_fabm%get_scalar_variable_id(fabm_standard_variables%number_of_days_since_start_of_the_year) + call model_fabm%link_scalar(id_yearday, 1.0d0) ! - days + + ! Complete initialization and check whether FABM has all dependencies fulfilled ! (i.e., whether all required calls to model%link_*_data have been made) From 4f4b51d85e6b2a299d99694425a4839cd402884a Mon Sep 17 00:00:00 2001 From: Paolo Lazzari Date: Thu, 19 Feb 2026 14:06:11 +0100 Subject: [PATCH 47/97] Improve ogstm.yaml handling in deploy_code.py Add error handling for ogstm.yaml copying process and create template if not found. --- testcase/deploy_code.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/testcase/deploy_code.py b/testcase/deploy_code.py index cc7ef47d..c634a4ad 100644 --- a/testcase/deploy_code.py +++ b/testcase/deploy_code.py @@ -48,11 +48,12 @@ def deploy_code(test): fabm_yaml= CODEPATH + "/fabm/extern/ogs/fabm_multispectral_2xDetritus.yaml " os.system("cp -pf " + fabm_yaml + test['Dir'].decode() + "/fabm.yaml") - try: + + ret = os.system("cp -pf ogstm.yaml " + test['Dir'].decode() + "/ogstm.yaml") + if ret != 0: + print("ogstm.yaml not found, creating template...") + os.system("python create_ogstm_yaml.py") os.system("cp -pf ogstm.yaml " + test['Dir'].decode() + "/ogstm.yaml") - except Exception as e: - print("Missing ogstm.yaml:", e) - print("To create a template ogstm.yaml launch python create_ogstm_yaml.py") else: print("BGC_TYPE " + test['BGC_TYPE'].decode() + "wrong/undefined choose within [DEFAULT[Default,default], BFM[bfm], FABM[fabm]]") From a98de3ecfbf97877215c8a023fb9f414912624d3 Mon Sep 17 00:00:00 2001 From: Paolo Lazzari Date: Thu, 19 Feb 2026 18:00:08 +0100 Subject: [PATCH 48/97] Include instructions to apply derivatives from FABM --- src/BIO/BIO_mem.f90 | 11 +++--- src/BIO/trcbio_fabm.F90 | 82 +++++++++++++++-------------------------- 2 files changed, 36 insertions(+), 57 deletions(-) diff --git a/src/BIO/BIO_mem.f90 b/src/BIO/BIO_mem.f90 index f425c651..296fce62 100644 --- a/src/BIO/BIO_mem.f90 +++ b/src/BIO/BIO_mem.f90 @@ -61,6 +61,7 @@ subroutine myalloc_BIO() INTEGER :: err INTEGER :: ivar + INTEGER :: ji,jj double precision :: aux_mem #ifdef key_trc_fabm type (type_fabm_interior_variable_id) :: interior_id @@ -171,11 +172,11 @@ subroutine myalloc_BIO() ! Initialize the tracers ! This sets the values of arrays sent to model%link_interior_state_data, ! in this case those in interior_state. -! do k = 1, nz -! do j = 1, ny -! call model_fabm%initialize_interior_state(1, nx, j, k) -! end do -! end do + do ji = 1, jpi + do jj = 1, jpj + call model_fabm%initialize_interior_state(1, jpk, jj, ji) + end do + end do ! At this point, initialization is complete. #endif diff --git a/src/BIO/trcbio_fabm.F90 b/src/BIO/trcbio_fabm.F90 index 9eaf103c..e5925e3e 100644 --- a/src/BIO/trcbio_fabm.F90 +++ b/src/BIO/trcbio_fabm.F90 @@ -62,8 +62,7 @@ SUBROUTINE trcbio_fabm !!! local declarations !!! ================== - double precision,dimension(jptra,jpk) :: b - double precision,dimension(jpk,jptra) :: a + double precision,dimension(jpk,jptra) :: dy double precision,dimension(4,jpk) :: c ! double precision,dimension(jptra_dia,jpk) :: d double precision,dimension(jpk,16) :: er @@ -78,17 +77,43 @@ SUBROUTINE trcbio_fabm !!!---------------------------------------------------------------------- -!!! statement functions !!! =================== ! | --------------| -! | BFM MODEL CALL| +! | FABM MODEL CALL| ! | --------------| ! BIOparttime = MPI_WTIME() +! Prepare all fields FABM needs to compute source terms (e.g., light) +call model_fabm%prepare_inputs() + +! In the loops below, dy and w are local to the j,k point being processed. +! They would therefore need to be processed further within the loop to be included in +! the host's advection-diffusion-reaction treatment. +! Alternatively, the could be declared as (4D) global variables that are built up +! in the loop and processed after. + + DO ji=1,jpi + DO jj=1,jpj + ! Retrieve tracer source terms (tracer units s-1). + ! Array dy(1:nx, 1:size(model%interior_state_variables)) is assumed to be allocated. + dy = 0 + bottom = mbathy(jj,ji) + call model_fabm%get_interior_sources(1, jpk, jj, ji, dy) + DO jtr=1, jptra + tra(1:bottom,jj,ji,jtr) =tra(1:bottom,jj,ji,jtr) +dy(1:bottom,jtr) ! increment trend + END DO + ! Retrieve vertical velocities (sinking, floating, active movement) in m s-1. + ! Array w(1:nx,1:size(model%interior_state_variables)) is assumed to be allocated. +! call model_fabm%get_vertical_movement(1, jpk, jj, ji, w) + end do +end do + +! Compute any remaining diagnostics +call model_fabm%finalize_outputs() ! surf_mask(:) = 0. ! surf_mask(1) = 1. ! ------------------------------------------------- @@ -109,24 +134,6 @@ SUBROUTINE trcbio_fabm ! er(:,10) = 8.1 -#ifdef gdept1d -! er(:,11) is calculated outside the loop on ji,jj -! do jk=1, jpk -! correct_fact= 1.0D0 - -! if ( (gdept(jk) .GT. 1000.0D0 ) .AND. (gdept(jk) .LT. 2000.0D0 )) then -! correct_fact= 0.25D0 -! endif - -! if (gdept(jk) .GE. 2000.0D0 ) then -! correct_fact= 0.0D0 -! endif - -! er(jk,11) = correct_fact * ( gdept(jpk)-gdept(jk) ) /gdept(jpk) -! enddo -#endif - - ! DO ji=1,jpi ! DO jj=1,jpj ! if (bfmmask(1,jj,ji) == 0) CYCLE @@ -140,36 +147,7 @@ SUBROUTINE trcbio_fabm ! Environmental regulating factors (er,:) -! er(1:bottom,1) = tn (1:bottom,jj,ji)! Temperature (Celsius) -! er(1:bottom,2) = sn (1:bottom,jj,ji) ! Salinity PSU -! er(1:bottom,3) = rho(1:bottom,jj,ji) ! Density Kg/m3 -! er(1 ,4) = ice ! from 0 to 1 adimensional -! er(1 ,5) = ogstm_co2(jj,ji) ! CO2 Mixing Ratios (ppm) 390 -! er(1:bottom,6) = PAR(1:bottom,jj,ji,1) ! PAR for diatoms -! er(1:bottom,7) = PAR(1:bottom,jj,ji,2) ! PAR for flagellates -! er(1:bottom,8) = PAR(1:bottom,jj,ji,3) ! PAR for pico phytoplankton -! er(1:bottom,9) = PAR(1:bottom,jj,ji,4) ! PAR for dinoflagellates -! er(1:bottom,10) = PAR(1:bottom,jj,ji,5) ! total PAR for CDOM -! er(1 ,11) = DAY_LENGTH(jj,ji) ! fotoperiod expressed in hours -! er(1:bottom,12) = e3t(1:bottom,jj,ji) ! depth in meters of the given cell -! er(1 ,13) = vatm(jj,ji) ! wind speed (m/s) -! er(1:bottom,14) = ogstm_PH(1:bottom,jj,ji) ! 8.1 -! er(1 ,15) = RMU(jj,ji) ! avg. cosine direct - -#ifndef gdept1d -! do jk=1,bottom -! correct_fact= 1.0D0 -! if ( (gdept(jk,jj,ji) .GT. 1000.0D0 ) .AND. (gdept(jk,jj,ji) .LT. 2000.0D0)) then -! correct_fact= 0.25D0 -! endif - -! if (gdept(jk,jj,ji) .GE. 2000.0D0 ) then -! correct_fact= 0.0D0 -! endif - -! er(jk,16) = correct_fact * ( gdept(jpk,jj,ji)-gdept(jk,jj,ji) ) /gdept(jpk,jj,ji) -! enddo -#endif + ! call BFM1D_Input_EcologyDynamics(bottom,a,jtrmax,er) ! call BFM1D_reset() From 57ffbf45991c0df50f031e338072add97f81fb39 Mon Sep 17 00:00:00 2001 From: Paolo Lazzari Date: Mon, 23 Feb 2026 15:56:14 +0100 Subject: [PATCH 49/97] adding mask for terrain points --- src/BIO/BIO_mem.f90 | 5 ++++- src/BIO/trcbio_fabm.F90 | 7 ++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/BIO/BIO_mem.f90 b/src/BIO/BIO_mem.f90 index 296fce62..0cf7c8e8 100644 --- a/src/BIO/BIO_mem.f90 +++ b/src/BIO/BIO_mem.f90 @@ -46,6 +46,7 @@ subroutine initialize_FABM() ! Below, we assume all state variable values are combined in an array interior_state with ! shape nx, ny, nz, size(model%interior_state_variables). jptra=size(model_fabm%interior_state_variables) + ! In FABM interior diagnostics includes already fluxes ! and they are counted in jptra_var therefore jptra_flux = 0 ! we keep definition of jptra_flux for back compatibility with older BFM @@ -96,7 +97,9 @@ subroutine myalloc_BIO() ! and used in hard_tissue_pump.F also in land points ice=0 #ifdef key_trc_fabm - ! Provide extents of the spatial domain (number of layers nz for a 1D column) + ! Provide FABM with the vertical indices of the surface and bottom, and the land-sea mask. + call model_fabm%set_bottom_index(mbathy) ! NB mbkt extents should match dimension lengths provided to model%set_domain + call model_fabm%set_mask(tmask,tmask(1,:,:)) ! NB tmask extents should match dimension lengths provided to model%set_domain ! At this point (after the call to fabm_create_model), memory should be ! allocated to hold the values of all size(model%interior_state_variables) state variables. diff --git a/src/BIO/trcbio_fabm.F90 b/src/BIO/trcbio_fabm.F90 index e5925e3e..9e11c2b7 100644 --- a/src/BIO/trcbio_fabm.F90 +++ b/src/BIO/trcbio_fabm.F90 @@ -100,12 +100,9 @@ SUBROUTINE trcbio_fabm DO jj=1,jpj ! Retrieve tracer source terms (tracer units s-1). ! Array dy(1:nx, 1:size(model%interior_state_variables)) is assumed to be allocated. + if (tmask(1,jj,ji) == 0) CYCLE dy = 0 - bottom = mbathy(jj,ji) - call model_fabm%get_interior_sources(1, jpk, jj, ji, dy) - DO jtr=1, jptra - tra(1:bottom,jj,ji,jtr) =tra(1:bottom,jj,ji,jtr) +dy(1:bottom,jtr) ! increment trend - END DO + call model_fabm%get_interior_sources(1, jk, jj, ji, tra(:,jj,ji,:)) ! Retrieve vertical velocities (sinking, floating, active movement) in m s-1. ! Array w(1:nx,1:size(model%interior_state_variables)) is assumed to be allocated. ! call model_fabm%get_vertical_movement(1, jpk, jj, ji, w) From 81631bc81aefee2480cc63cb8dc41e4776ed46c1 Mon Sep 17 00:00:00 2001 From: Paolo Lazzari Date: Mon, 2 Mar 2026 11:21:16 +0100 Subject: [PATCH 50/97] initialized aksi short wave radiation, huge values gives overflow need to check more in detail --- src/BIO/BIO_mem.f90 | 1 + 1 file changed, 1 insertion(+) diff --git a/src/BIO/BIO_mem.f90 b/src/BIO/BIO_mem.f90 index 0cf7c8e8..4aa34f18 100644 --- a/src/BIO/BIO_mem.f90 +++ b/src/BIO/BIO_mem.f90 @@ -137,6 +137,7 @@ subroutine myalloc_BIO() horizontal_id=model_fabm%get_horizontal_variable_id('surface_downwelling_shortwave_flux') ! to be provided in case monospectral formulation is used + surface_downwelling_shortwave_flux=1.0d0 call model_fabm%link_horizontal_data(horizontal_id, surface_downwelling_shortwave_flux) ! W m^-2 horizontal_id = model_fabm%get_horizontal_variable_id('atmosphere_mass_content_of_water_vapor') From cc187dda5e1e52f04168394ca96c854e82757e6d Mon Sep 17 00:00:00 2001 From: Paolo Lazzari Date: Mon, 2 Mar 2026 11:22:32 +0100 Subject: [PATCH 51/97] initialized diagnostic to zero to prevent overflow, need to put correct values --- src/BIO/trcbio_fabm.F90 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/BIO/trcbio_fabm.F90 b/src/BIO/trcbio_fabm.F90 index 9e11c2b7..8dea9435 100644 --- a/src/BIO/trcbio_fabm.F90 +++ b/src/BIO/trcbio_fabm.F90 @@ -102,7 +102,7 @@ SUBROUTINE trcbio_fabm ! Array dy(1:nx, 1:size(model%interior_state_variables)) is assumed to be allocated. if (tmask(1,jj,ji) == 0) CYCLE dy = 0 - call model_fabm%get_interior_sources(1, jk, jj, ji, tra(:,jj,ji,:)) + call model_fabm%get_interior_sources(1, jpk, jj, ji, tra(:,jj,ji,:)) ! Retrieve vertical velocities (sinking, floating, active movement) in m s-1. ! Array w(1:nx,1:size(model%interior_state_variables)) is assumed to be allocated. ! call model_fabm%get_vertical_movement(1, jpk, jj, ji, w) @@ -121,8 +121,8 @@ SUBROUTINE trcbio_fabm ! ---------------- Fuori dai punti BFM ! ogstm_sediPI=0. -! tra_DIA = 0. -! tra_DIA_2d = 0. ! da sistemare + tra_DIA = 0. + tra_DIA_2d = 0. ! da sistemare ! Initialization From 02583ced54d155c42956093425b3877382da62c2 Mon Sep 17 00:00:00 2001 From: Paolo Lazzari Date: Mon, 2 Mar 2026 14:25:47 +0100 Subject: [PATCH 52/97] adding diagnostic data from FABM to OGSTM --- src/BIO/trcbio_fabm.F90 | 86 ++++++++++++++--------------------------- 1 file changed, 28 insertions(+), 58 deletions(-) diff --git a/src/BIO/trcbio_fabm.F90 b/src/BIO/trcbio_fabm.F90 index 8dea9435..de4d6f6a 100644 --- a/src/BIO/trcbio_fabm.F90 +++ b/src/BIO/trcbio_fabm.F90 @@ -1,5 +1,4 @@ - - SUBROUTINE trcbio_fabm +SUBROUTINE trcbio_fabm #ifdef key_trc_fabm !!!--------------------------------------------------------------------- !!! @@ -96,8 +95,8 @@ SUBROUTINE trcbio_fabm ! Alternatively, the could be declared as (4D) global variables that are built up ! in the loop and processed after. - DO ji=1,jpi - DO jj=1,jpj +DO ji=1,jpi + DO jj=1,jpj ! Retrieve tracer source terms (tracer units s-1). ! Array dy(1:nx, 1:size(model%interior_state_variables)) is assumed to be allocated. if (tmask(1,jj,ji) == 0) CYCLE @@ -106,8 +105,8 @@ SUBROUTINE trcbio_fabm ! Retrieve vertical velocities (sinking, floating, active movement) in m s-1. ! Array w(1:nx,1:size(model%interior_state_variables)) is assumed to be allocated. ! call model_fabm%get_vertical_movement(1, jpk, jj, ji, w) - end do -end do + END DO +END DO ! Compute any remaining diagnostics call model_fabm%finalize_outputs() @@ -121,59 +120,30 @@ SUBROUTINE trcbio_fabm ! ---------------- Fuori dai punti BFM ! ogstm_sediPI=0. - tra_DIA = 0. - tra_DIA_2d = 0. ! da sistemare - - -! Initialization -! a = 1.0 -! er = 1.0 -! er(:,10) = 8.1 - - -! DO ji=1,jpi -! DO jj=1,jpj -! if (bfmmask(1,jj,ji) == 0) CYCLE -! bottom = mbathy(jj,ji) - -! DO jtr=1, jtrmax - -! a(1:bottom, jtr) = trn(1:bottom,jj,ji,jtr) ! current biogeochemical concentrations - -! END DO - -! Environmental regulating factors (er,:) - - -! call BFM1D_Input_EcologyDynamics(bottom,a,jtrmax,er) - -! call BFM1D_reset() - -! call EcologyDynamics() - -! call BFM1D_Output_EcologyDynamics(b, c, d, d2) - -! DO jtr=1, jtrmax -! tra(1:bottom,jj,ji,jtr) =tra(1:bottom,jj,ji,jtr) +b(jtr,1:bottom) ! trend -! END DO - -! DO jtr=1,4 -! ogstm_sediPI(1:bottom,jj,ji,jtr) = c(jtr,1:bottom) ! BFM output of sedimentation speed (m/d) -! END DO - - -! DO jk = 1,bottom -! DO jtr=1,jptra_dia -! tra_DIA(jtr, jk ,jj,ji) = d(jtr,jk) ! diagnostic -! END DO -! ENDDO - -! tra_DIA_2d(:,jj,ji) = d2(:) ! diagnostic - -! ogstm_PH(1:bottom,jj,ji) = d(pppH,1:bottom) ! Follows solver guess, put 8.0 if pppH is not defined +write(*,*) 'Shape of interior_diagnostic_variables:', shape(model_fabm%get_interior_diagnostic_data(1)) +! Add these lines to get details about the pointed object: + +DO jn=1,size(model_fabm%interior_diagnostic_variables) + IF (model_fabm%interior_diagnostic_variables(jn)%save) THEN +! write(*,*) 'jn=', jn +! write(*,*) 'Shape of get_interior_diagnostic_data(jn):', shape(model_fabm%get_interior_diagnostic_data(jn)) +! write(*,*) 'Shape of tra_DIA(jn,:,:,:):', shape(tra_DIA(jn,:,:,:)) + tra_DIA(jn, : , : ,:) = model_fabm%get_interior_diagnostic_data(jn) + ELSE + tra_DIA(jn, : , :, :) = 0. + END IF +END DO + +write(*,*) 'Shape of horizontal_diagnostic_variables:', shape(model_fabm%get_horizontal_diagnostic_data(1)) + +DO jn=1,size(model_fabm%horizontal_diagnostic_variables) + IF (model_fabm%horizontal_diagnostic_variables(jn)%save) THEN + tra_DIA_2d(jn, :, :) = model_fabm%get_horizontal_diagnostic_data(jn) + ELSE + tra_DIA_2d(jn, :, :) = 0. + END IF +END DO -! END DO -! END DO ! ---------------------------------------------------------------------- ! BEGIN BC_REFACTORING SECTION From 2b19836a42e0241512c0f808affe5e892a5bbd06 Mon Sep 17 00:00:00 2001 From: Paolo Lazzari Date: Tue, 3 Mar 2026 11:54:10 +0100 Subject: [PATCH 53/97] Adding sinking velocity taking the velocity from FABM, all variables possibly sink according to FABM specs --- src/BIO/BIO_mem.f90 | 10 +- src/BIO/SED_mem.f90 | 13 +- src/BIO/trcbio_fabm.F90 | 39 +----- src/BIO/{trcsed.f90 => trcsed_bfm.f90} | 4 +- src/BIO/trcsed_fabm.f90 | 183 +++++++++++++++++++++++++ src/BIO/trcsms.f90 | 9 +- src/General/memory.f90 | 2 +- 7 files changed, 218 insertions(+), 42 deletions(-) rename src/BIO/{trcsed.f90 => trcsed_bfm.f90} (98%) create mode 100644 src/BIO/trcsed_fabm.f90 diff --git a/src/BIO/BIO_mem.f90 b/src/BIO/BIO_mem.f90 index 4aa34f18..4249052d 100644 --- a/src/BIO/BIO_mem.f90 +++ b/src/BIO/BIO_mem.f90 @@ -87,7 +87,15 @@ subroutine myalloc_BIO() allocate(co2_IO(jpj,jpi,2)) co2_IO = huge(co2_IO(1,1,1)) - allocate(ogstm_sedipi(jpk,jpj,jpi,4)) + +#ifdef key_trc_bfm + allocate(ogstm_sedipi(jpk,jpj,jpi,4)) +#endif + +#ifdef key_trc_fabm + allocate(ogstm_sedipi(jpk,jpj,jpi,jptra)) +#endif + ogstm_sedipi = huge(ogstm_sedipi(1,1,1,1)) allocate(ogstm_ph(jpk,jpj,jpi)) ogstm_ph = huge(ogstm_ph(1,1,1)) diff --git a/src/BIO/SED_mem.f90 b/src/BIO/SED_mem.f90 index 0c52cae3..e77cc99f 100644 --- a/src/BIO/SED_mem.f90 +++ b/src/BIO/SED_mem.f90 @@ -16,7 +16,7 @@ MODULE SED_mem INTEGER :: dimen_jvsed - INTEGER :: nsed=26 + INTEGER :: nsed INTEGER, allocatable :: sed_idx(:) INTEGER, allocatable :: jarr_sed(:,:),jarr_sed_flx(:,:) double precision, allocatable :: ztra(:,:) @@ -46,10 +46,11 @@ subroutine myalloc_SED() #endif dimen_jvsed=0 + +#ifdef key_trc_bfm + nsed=26 allocate(sed_idx(nsed)) sed_idx = huge(sed_idx(1)) -#ifdef key_trc_bfm - sed_idx(1) = ppR6c sed_idx(2) = ppR6n sed_idx(3) = ppR6p @@ -82,6 +83,9 @@ subroutine myalloc_SED() sed_idx(25) = ppP4l sed_idx(26) = ppO5c #endif +#ifdef key_trc_fabm + nsed=jptra +#endif allocate(jarr_sed(2, jpi*jpj)) jarr_sed = huge(jarr_sed(1,1)) @@ -102,8 +106,9 @@ END subroutine myalloc_SED subroutine clean_memory_sed - +#ifdef key_trc_bfm deallocate(sed_idx) +#endif deallocate(jarr_sed) deallocate(jarr_sed_flx) deallocate(ztra) diff --git a/src/BIO/trcbio_fabm.F90 b/src/BIO/trcbio_fabm.F90 index de4d6f6a..36f3f110 100644 --- a/src/BIO/trcbio_fabm.F90 +++ b/src/BIO/trcbio_fabm.F90 @@ -60,30 +60,17 @@ SUBROUTINE trcbio_fabm !!!---------------------------------------------------------------------- !!! local declarations !!! ================== - + integer :: jk,jj,ji,jn double precision,dimension(jpk,jptra) :: dy - double precision,dimension(4,jpk) :: c -! double precision,dimension(jptra_dia,jpk) :: d - double precision,dimension(jpk,16) :: er - double precision,dimension(jptra_dia_2d) :: d2 - - - integer :: jk,jj,ji,jb,jn - integer :: ivar - integer :: jtr,jtrmax,tra_idx - integer :: bottom - double precision :: correct_fact - - !!!---------------------------------------------------------------------- -!!! =================== -! | --------------| -! | FABM MODEL CALL| -! | --------------| -! BIOparttime = MPI_WTIME() +! | --------------- | +! | FABM MODEL CALL | +! | --------------- | + + BIOparttime = MPI_WTIME() ! Prepare all fields FABM needs to compute source terms (e.g., light) @@ -104,24 +91,13 @@ SUBROUTINE trcbio_fabm call model_fabm%get_interior_sources(1, jpk, jj, ji, tra(:,jj,ji,:)) ! Retrieve vertical velocities (sinking, floating, active movement) in m s-1. ! Array w(1:nx,1:size(model%interior_state_variables)) is assumed to be allocated. -! call model_fabm%get_vertical_movement(1, jpk, jj, ji, w) + call model_fabm%get_vertical_movement(1, jpk, jj, ji, ogstm_sedipi(:,jj,ji,:)) END DO END DO ! Compute any remaining diagnostics call model_fabm%finalize_outputs() -! surf_mask(:) = 0. -! surf_mask(1) = 1. -! ------------------------------------------------- - - ! tra_idx = tra_matrix_gib(1) -! jtrmax=jptra - -! ---------------- Fuori dai punti BFM -! ogstm_sediPI=0. -write(*,*) 'Shape of interior_diagnostic_variables:', shape(model_fabm%get_interior_diagnostic_data(1)) -! Add these lines to get details about the pointed object: DO jn=1,size(model_fabm%interior_diagnostic_variables) IF (model_fabm%interior_diagnostic_variables(jn)%save) THEN @@ -134,7 +110,6 @@ SUBROUTINE trcbio_fabm END IF END DO -write(*,*) 'Shape of horizontal_diagnostic_variables:', shape(model_fabm%get_horizontal_diagnostic_data(1)) DO jn=1,size(model_fabm%horizontal_diagnostic_variables) IF (model_fabm%horizontal_diagnostic_variables(jn)%save) THEN diff --git a/src/BIO/trcsed.f90 b/src/BIO/trcsed_bfm.f90 similarity index 98% rename from src/BIO/trcsed.f90 rename to src/BIO/trcsed_bfm.f90 index 8af214b8..15c37634 100644 --- a/src/BIO/trcsed.f90 +++ b/src/BIO/trcsed_bfm.f90 @@ -1,4 +1,4 @@ - SUBROUTINE trcsed + SUBROUTINE trcsed_bfm !!!--------------------------------------------------------------------- !!! !!! ROUTINE trcsed @@ -218,4 +218,4 @@ SUBROUTINE trcsed !#endif - END SUBROUTINE trcsed + END SUBROUTINE trcsed_bfm diff --git a/src/BIO/trcsed_fabm.f90 b/src/BIO/trcsed_fabm.f90 new file mode 100644 index 00000000..25cd090e --- /dev/null +++ b/src/BIO/trcsed_fabm.f90 @@ -0,0 +1,183 @@ + SUBROUTINE trcsed_fabm +!!!--------------------------------------------------------------------- +!!! +!!! ROUTINE trcsed +!!! ******************* +!!! +!!! PURPOSE : +!!! --------- +!!! compute the now trend due to the vertical sedimentation of +!!! detritus and add it to the general trend of detritus equations. +!!! +!!! +!! METHOD : +!! ------- +!! this ROUTINE compute not exactly the advection but the +!! transport term, i.e. dz(wt) and dz(ws)., dz(wtr) +!! using an upstream scheme +!! +!! the now vertical advection of tracers is given by: +!! +!! dz(trn wn) = 1/bt dk+1( e1t e2t vsed (trn) ) +!! +!! add this trend now to the general trend of tracer (ta,sa,tra): +!! +!! tra = tra + dz(trn wn) +!! +!! IF 'key_trc_diabio' key is activated, the now vertical advection +!! trend of passive tracers is saved for futher diagnostics. +!! +!! multitasked on vertical slab (jj-loop) +!! +!! +!! +!! OUTPUT : +!! ------ +!! +!! WORKSPACE : +!! --------- +!! local +!! ze1e2w, ze3tr, ztra +!! COMMON +!! +!! EXTERNAL : no +!! -------- +!! +!! REFERENCES : no +!! ---------- + + USE myalloc + USE BIO_mem + USE SED_mem + USE DIA_mem + IMPLICIT NONE + + +!!---------------------------------------------------------------------- +!! local declarations +!! ================== + + +#ifdef key_trc_fabm + + LOGICAL :: l1,l2,l3 + INTEGER :: ji,jj,jk,jv,jf,jn + INTEGER :: bottom + double precision :: ze3tr,d2s +! omp variables + +!!---------------------------------------------------------------------- +!! statement functions +!! =================== + + + + + d2s=1./3600./24. ! speed from (m/day) to (m/s) + + IF (dimen_jvsed .EQ. 0) THEN ! initialization phase + DO ji = 2,jpim1 + DO jj = 2,jpjm1 + IF(tmask(1,jj,ji) .NE. 0) THEN + dimen_jvsed = dimen_jvsed + 1 + jarr_sed(1,dimen_jvsed) = jj + jarr_sed(2,dimen_jvsed) = ji + ENDIF + END DO + END DO +! Cross matrix between transect and local optimized indexing + jarr_sed_flx=0 + + DO jf=1,Fsize + DO jv=1, dimen_jvsed + DO jk=1,jpk + l1 = flx_ridxt(jf,4) .EQ. jarr_sed(2,jv) + l2 = flx_ridxt(jf,3) .EQ. jarr_sed(1,jv) + l3 = flx_ridxt(jf,2) .EQ. jk + IF ( l1 .AND. l2 .AND. l3) THEN + jarr_sed_flx(jk,jv)= jf + END IF + END DO + END DO + END DO + + ENDIF ! End initialization phase (once at the beginning) + + +! vertical slab +! ============= + + + + MAIN_LOOP: DO jv=1,dimen_jvsed + +! if( mytid + jv <= dimen_jvsed) then +! 1. sedimentation of detritus : upstream scheme +! ----------------------------------------------- +! 1.1 initialisation needed for bottom and surface value + + ji = jarr_sed(2,jv) + jj = jarr_sed(1,jv) + + + DO jn = 1, nsed + DO jk = 1,jpk + + zwork(jk,jn,1) = 0. + + END DO + END DO + +! 1.2 tracer flux at w-point: we use -vsed (downward flux) +! with simplification : no e1*e2 + + + DO jn =1,nsed + DO jk = 2,jpk + zwork(jk,jn,1) = -ogstm_sedipi(jk-1,jj,ji,jn) * trn(jk-1,jj,ji,jn) + END DO + END DO + + bottom = mbathy(jj,ji) + 1 + zwork(bottom,:,1) = bottom_flux * zwork(bottom,:,1) ! bottom_flux = 0 -> no flux in the sea floor + +! 1.3 tracer flux divergence at t-point added to the general trend + + DO jk = 1,jpkm1 + jf= jarr_sed_flx(jk,jV) + + ze3tr = 1./e3t(jk,jj,ji) + + DO jn =1,nsed + ztra(jn,1) = -ze3tr * (zwork(jk,jn,1) - zwork(jk+1,jn,1)) + IF ((Fsize .GT. 0) .AND. (jf .GT. 0)) THEN + diaflx(4,jf,jn) = diaflx(4, jf,jn) + zwork(jk,jn,1)*rdt + ENDIF + END DO + + DO jn =1,nsed +!!! d2s convert speed from (m/day) to (m/s) + tra(jk,jj,ji,jn) = tra(jk,jj,ji,jn) + ztra(jn,1)*d2s + END DO + +#ifdef key_trc_diabio + trbio(jk,jj,ji,8) = ztra +#endif + + END DO + + + END DO MAIN_LOOP + +#endif + +!!!$omp end parallel do + + +!#else + +! no Sedimentation + +!#endif + + END SUBROUTINE trcsed_fabm diff --git a/src/BIO/trcsms.f90 b/src/BIO/trcsms.f90 index 038f3572..1e0cc067 100644 --- a/src/BIO/trcsms.f90 +++ b/src/BIO/trcsms.f90 @@ -46,8 +46,13 @@ SUBROUTINE trcsms(datestring) !! trcsed no updated for time step advancing #if defined key_trc_sed - CALL trcsed ! tracers: sedimentation model -# endif +#if defined key_trc_bfm + CALL trcsed_bfm ! tracers: sedimentation model +#endif +#if defined key_trc_fabm + CALL trcsed_fabm ! tracers: sedimentation model +#endif +#endif trcsmsparttime = MPI_WTIME() - trcsmsparttime ! cronometer-stop trcsmstottime = trcsmstottime + trcsmsparttime diff --git a/src/General/memory.f90 b/src/General/memory.f90 index ec9306a1..e51615f7 100644 --- a/src/General/memory.f90 +++ b/src/General/memory.f90 @@ -390,11 +390,11 @@ MODULE myalloc LOGICAL photop ! Photoperiod formulation if false daylength is 24 h LOGICAL atlantic_bfm ! atlantic buffer biology activation + double precision bottom_flux ! (NAMELIST) # if defined key_trc_bfm double precision vsedR6 ! sedimentation speed of small detritus (NAMELIST) double precision vsedR8 ! sedimentation speed of large detritus (NAMELIST) double precision vsedO5c ! sedimentation speed of calcite(NAMELIST) - double precision bottom_flux ! (NAMELIST) !! optical parameters double precision, allocatable :: xpar(:,:,:) !par (photosynthetic available radiation) From f1cde3c79e7d978775ac5294befb2c223174872c Mon Sep 17 00:00:00 2001 From: Paolo Lazzari Date: Wed, 4 Mar 2026 18:33:55 +0100 Subject: [PATCH 54/97] adding time variable, need to be fixed --- src/BIO/trcbio_fabm.F90 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/BIO/trcbio_fabm.F90 b/src/BIO/trcbio_fabm.F90 index 36f3f110..d0d5a1bb 100644 --- a/src/BIO/trcbio_fabm.F90 +++ b/src/BIO/trcbio_fabm.F90 @@ -74,7 +74,7 @@ SUBROUTINE trcbio_fabm ! Prepare all fields FABM needs to compute source terms (e.g., light) -call model_fabm%prepare_inputs() +call model_fabm%prepare_inputs(rdt) ! In the loops below, dy and w are local to the j,k point being processed. ! They would therefore need to be processed further within the loop to be included in From 2f7f73c48d18197a54fbc3bcb8b072cc52c1c736 Mon Sep 17 00:00:00 2001 From: Paolo Lazzari Date: Wed, 4 Mar 2026 19:21:22 +0100 Subject: [PATCH 55/97] passing time parameters to FABM --- src/BIO/trcbio_fabm.F90 | 19 +++++++++++-------- src/BIO/trcsms.f90 | 4 ++-- src/General/TimeManager.f90 | 15 +++++++++++++++ 3 files changed, 28 insertions(+), 10 deletions(-) diff --git a/src/BIO/trcbio_fabm.F90 b/src/BIO/trcbio_fabm.F90 index d0d5a1bb..c417546b 100644 --- a/src/BIO/trcbio_fabm.F90 +++ b/src/BIO/trcbio_fabm.F90 @@ -1,4 +1,4 @@ -SUBROUTINE trcbio_fabm +SUBROUTINE trcbio_fabm(datestring) #ifdef key_trc_fabm !!!--------------------------------------------------------------------- !!! @@ -38,6 +38,7 @@ SUBROUTINE trcbio_fabm USE BIO_mem USE OPT_mem, ONLY: PAR, RMU USE BC_mem + USE calendar USE mpi !!! FABM IMPLEMENTATION @@ -56,25 +57,28 @@ SUBROUTINE trcbio_fabm IMPLICIT NONE - + character(LEN=17), INTENT(IN) :: datestring !!!---------------------------------------------------------------------- !!! local declarations !!! ================== integer :: jk,jj,ji,jn - double precision,dimension(jpk,jptra) :: dy + INTEGER :: year, month, day + double precision :: sec + double precision :: time !!!---------------------------------------------------------------------- +call read_date_string(datestring, year, month, day, sec) + ! | --------------- | ! | FABM MODEL CALL | ! | --------------- | - BIOparttime = MPI_WTIME() - +BIOparttime = MPI_WTIME() ! Prepare all fields FABM needs to compute source terms (e.g., light) -call model_fabm%prepare_inputs(rdt) +call model_fabm%prepare_inputs(SEC_FROM_START(datestring),year,month,day,sec) ! In the loops below, dy and w are local to the j,k point being processed. ! They would therefore need to be processed further within the loop to be included in @@ -87,11 +91,10 @@ SUBROUTINE trcbio_fabm ! Retrieve tracer source terms (tracer units s-1). ! Array dy(1:nx, 1:size(model%interior_state_variables)) is assumed to be allocated. if (tmask(1,jj,ji) == 0) CYCLE - dy = 0 call model_fabm%get_interior_sources(1, jpk, jj, ji, tra(:,jj,ji,:)) ! Retrieve vertical velocities (sinking, floating, active movement) in m s-1. ! Array w(1:nx,1:size(model%interior_state_variables)) is assumed to be allocated. - call model_fabm%get_vertical_movement(1, jpk, jj, ji, ogstm_sedipi(:,jj,ji,:)) + call model_fabm%get_vertical_movement(1, jpk, jj, ji, ogstm_sedipi(:,jj,ji,:)) END DO END DO diff --git a/src/BIO/trcsms.f90 b/src/BIO/trcsms.f90 index 1e0cc067..0987be31 100644 --- a/src/BIO/trcsms.f90 +++ b/src/BIO/trcsms.f90 @@ -37,11 +37,11 @@ SUBROUTINE trcsms(datestring) CALL trcopt ! tracers: optical model #if defined key_trc_fabm - CALL trcbio_fabm ! tracers: biological model + CALL trcbio_fabm(datestring) ! tracers: biological model # endif #if defined key_trc_bfm - CALL trcbio_bfm ! tracers: biological model + CALL trcbio_bfm() ! tracers: biological model # endif !! trcsed no updated for time step advancing diff --git a/src/General/TimeManager.f90 b/src/General/TimeManager.f90 index 3031bf22..a56ed8ba 100644 --- a/src/General/TimeManager.f90 +++ b/src/General/TimeManager.f90 @@ -814,5 +814,20 @@ double precision FUNCTION INSTANT_PAR(datestring,MEAN_PAR) INSTANT_PAR=MAX(1.0d-3, PI*POSITIVE_VALUE*MEAN_PAR ) END FUNCTION INSTANT_PAR + double precision FUNCTION SEC_FROM_START(datestring) + IMPLICIT NONE + CHARACTER(LEN=17), INTENT(IN) :: datestring + integer year, year0 + integer month, month0 + integer day, day0 + double precision sec, sec0, sec_diff + + call read_date_string(DATESTART, year0, month0, day0, sec0) + call read_date_string(datestring , year, month, day, sec) + call time_diff(year0, month0, day0, sec0, year, month,day,sec, SEC_FROM_START) + + + END FUNCTION SEC_FROM_START + END MODULE TIME_MANAGER From 2986ff19cec62ea6bed666974bc15929091cc0f4 Mon Sep 17 00:00:00 2001 From: Paolo Lazzari Date: Fri, 6 Mar 2026 15:49:52 +0100 Subject: [PATCH 56/97] added new function for day of the year --- src/General/TimeManager.f90 | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/General/TimeManager.f90 b/src/General/TimeManager.f90 index a56ed8ba..fc8ade93 100644 --- a/src/General/TimeManager.f90 +++ b/src/General/TimeManager.f90 @@ -829,5 +829,21 @@ double precision FUNCTION SEC_FROM_START(datestring) END FUNCTION SEC_FROM_START + double precision FUNCTION DAY_OF_THE_YEAR(datestring) + IMPLICIT NONE + CHARACTER(LEN=17), INTENT(IN) :: datestring + integer year, month, day + INTEGER, PARAMETER :: mon_len(12)=(/31,28,31,30,31,30,31,31,30,31,30,31/) + double precision sec + + call read_date_string(datestring, year, month, day, sec) + if (month ==1) then + DAY_OF_THE_YEAR = REAL(day-1, 8) + sec/86400.0 + else + DAY_OF_THE_YEAR = REAL(mon_len(month-1),8) + REAL(day-1, 8) + sec/86400.0 + endif + + END FUNCTION DAY_OF_THE_YEAR + END MODULE TIME_MANAGER From 3f956132a2250e03efa532bd6b2497cc38cd5410 Mon Sep 17 00:00:00 2001 From: Paolo Lazzari Date: Fri, 6 Mar 2026 15:50:57 +0100 Subject: [PATCH 57/97] pass to FABM the correct time informations --- src/BIO/trcbio_fabm.F90 | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) diff --git a/src/BIO/trcbio_fabm.F90 b/src/BIO/trcbio_fabm.F90 index c417546b..78040866 100644 --- a/src/BIO/trcbio_fabm.F90 +++ b/src/BIO/trcbio_fabm.F90 @@ -64,7 +64,7 @@ SUBROUTINE trcbio_fabm(datestring) integer :: jk,jj,ji,jn INTEGER :: year, month, day double precision :: sec - double precision :: time + double precision :: yearday !!!---------------------------------------------------------------------- @@ -78,8 +78,14 @@ SUBROUTINE trcbio_fabm(datestring) BIOparttime = MPI_WTIME() ! Prepare all fields FABM needs to compute source terms (e.g., light) +yearday = DAY_OF_THE_YEAR(datestring) +call model_fabm%link_scalar(fabm_standard_variables%number_of_days_since_start_of_the_year, yearday) call model_fabm%prepare_inputs(SEC_FROM_START(datestring),year,month,day,sec) +write(*,*) 'yearday: ', yearday +write(*,*) 'SEC_FROM_START: ', SEC_FROM_START(datestring) +write(*,*) 'year, month, day, sec: ', year, month, day, sec + ! In the loops below, dy and w are local to the j,k point being processed. ! They would therefore need to be processed further within the loop to be included in ! the host's advection-diffusion-reaction treatment. @@ -104,22 +110,31 @@ SUBROUTINE trcbio_fabm(datestring) DO jn=1,size(model_fabm%interior_diagnostic_variables) IF (model_fabm%interior_diagnostic_variables(jn)%save) THEN -! write(*,*) 'jn=', jn -! write(*,*) 'Shape of get_interior_diagnostic_data(jn):', shape(model_fabm%get_interior_diagnostic_data(jn)) -! write(*,*) 'Shape of tra_DIA(jn,:,:,:):', shape(tra_DIA(jn,:,:,:)) + write(*,*) 'jn=', jn + write(*,*) 'Name of diagnostic variable:', TRIM(model_fabm%interior_diagnostic_variables(jn)%name) + write(*,*) 'Shape of get_interior_diagnostic_data(jn):', shape(model_fabm%get_interior_diagnostic_data(jn)) + write(*,*) 'Shape of tra_DIA(jn,:,:,:):', shape(tra_DIA(jn,:,:,:)) + tra_DIA(jn, : , : ,:) = model_fabm%get_interior_diagnostic_data(jn) ELSE tra_DIA(jn, : , :, :) = 0. END IF + write(*,*) 'Value of tra_DIA(jn,:,:,:):', tra_DIA(jn,1,5,5) END DO DO jn=1,size(model_fabm%horizontal_diagnostic_variables) IF (model_fabm%horizontal_diagnostic_variables(jn)%save) THEN + write(*,*) 'jn=', jn + write(*,*) 'Name of diagnostic variable:', TRIM(model_fabm%horizontal_diagnostic_variables(jn)%name) + write(*,*) 'Shape of get_horizontal_diagnostic_data(jn):', shape(model_fabm%get_horizontal_diagnostic_data(jn)) + write(*,*) 'Shape of tra_DIA_2d(jn,:,:):', shape(tra_DIA_2d(jn,:,:)) + tra_DIA_2d(jn, :, :) = model_fabm%get_horizontal_diagnostic_data(jn) ELSE tra_DIA_2d(jn, :, :) = 0. END IF + write(*,*) 'Value of tra_DIA_2d(jn,:,:):', tra_DIA_2d(jn,5,5) END DO From 01ec57284f398fe5ea0294b474bd342b0a8e3883 Mon Sep 17 00:00:00 2001 From: Paolo Lazzari Date: Fri, 6 Mar 2026 15:52:14 +0100 Subject: [PATCH 58/97] from bfm to bgc flag activation --- src/General/parlec.f90 | 8 ++++---- src/General/step.f90 | 2 +- src/PHYS/trcave.f90 | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/General/parlec.f90 b/src/General/parlec.f90 index 96435133..8602b9a9 100644 --- a/src/General/parlec.f90 +++ b/src/General/parlec.f90 @@ -38,10 +38,10 @@ SUBROUTINE parlec NAMELIST/namhdf/ aht0 NAMELIST/nameos/ neos, rau0, ralpha, rbeta #ifdef key_trc_bfm - namelist /natnum/ rdt,variable_rdt, rsc,rtrn,ncor,ndttrc,ladv, lhdf, lsbc, lbfm, lzdf, lsnu, latmosph, & + namelist /natnum/ rdt,variable_rdt, rsc,rtrn,ncor,ndttrc,ladv, lhdf, lsbc, lbgc, lzdf, lsnu, latmosph, & ahtrb0,trcrat,ahtrc0,vsedR6,vsedR8,vsedO5c, photop,atlantic_bfm,bottom_flux,Euphotic_lev, IS_FREE_SURFACE #else - namelist /natnum/ rdt,variable_rdt, rsc,rtrn,ncor,ndttrc,ladv, lhdf, lsbc, lbfm, lzdf, lsnu, latmosph, & + namelist /natnum/ rdt,variable_rdt, rsc,rtrn,ncor,ndttrc,ladv, lhdf, lsbc, lbgc, lzdf, lsnu, latmosph, & ahtrb0,trcrat,ahtrc0,photop,atlantic_bfm,Euphotic_lev, IS_FREE_SURFACE #endif NAMELIST/General_IO/ nwritetrc, freq_ave_phys, freq_flux_dump, save_bkp_group2, deflate_ave, deflate_level_ave, deflate_rst, & @@ -144,7 +144,7 @@ SUBROUTINE parlec ladv = .TRUE. lzdf = .TRUE. lsnu = .TRUE. - lbfm = .TRUE. + lbgc = .TRUE. ahtrb0 = 0. trcrat = 1. ahtrc0 = aht0 @@ -182,7 +182,7 @@ SUBROUTINE parlec WRITE(numout,*) ' lsnu calls or not snutel = ', lsnu WRITE(numout,*) ' lsbc calls or not trcsbc = ', lsbc WRITE(numout,*) ' activation atmospheric deposition = ', latmosph - WRITE(numout,*) ' activation of bfm = ', lbfm + WRITE(numout,*) ' activation of bfm = ', lbgc WRITE(numout,*) ' background diffusivity for passive tr = ', ahtrb0 WRITE(numout,*) ' ratio betweeen passive and active tr diffusion coeff= ', trcrat WRITE(numout,*) ' horizontal eddy diffus. for passive tr = ', ahtrc0 diff --git a/src/General/step.f90 b/src/General/step.f90 index 48efea80..178d51e7 100644 --- a/src/General/step.f90 +++ b/src/General/step.f90 @@ -296,7 +296,7 @@ SUBROUTINE trcstp(datestring) ! tracers: sink and source (must be parallelized on vertical slab) IF (lsbc) CALL trcsbc ! surface cell processes, default lsbc = False - IF (lbfm) CALL trcsms(datestring) + IF (lbgc) CALL trcsms(datestring) IF (lzdf) CALL trczdf ! tracers: vertical diffusion diff --git a/src/PHYS/trcave.f90 b/src/PHYS/trcave.f90 index 889075fb..45bf0d25 100644 --- a/src/PHYS/trcave.f90 +++ b/src/PHYS/trcave.f90 @@ -133,7 +133,7 @@ SUBROUTINE trcave(datestring) ! ***************** DIAGNOSTICS ********************************************** - if (lbfm) THEN + if (lbgc) THEN ! FIRST, LOW FREQUENCY elapsed_time = elapsed_time_2 From 7ef22da999b03907d80f3c434aced9c6eb51cf35 Mon Sep 17 00:00:00 2001 From: Paolo Lazzari Date: Fri, 6 Mar 2026 15:52:49 +0100 Subject: [PATCH 59/97] add target and pointer definitions --- src/BIO-OPTICS/OPT_mem.f90 | 36 ++++++++++++++++++------------------ src/BIO/BIO_mem.f90 | 7 +++++-- src/General/memory.f90 | 18 +++++++++--------- 3 files changed, 32 insertions(+), 29 deletions(-) diff --git a/src/BIO-OPTICS/OPT_mem.f90 b/src/BIO-OPTICS/OPT_mem.f90 index dfb8dece..633943fd 100644 --- a/src/BIO-OPTICS/OPT_mem.f90 +++ b/src/BIO-OPTICS/OPT_mem.f90 @@ -34,25 +34,25 @@ MODULE OPT_mem double precision, allocatable :: asympIO(:,:,:,:) double precision, allocatable :: ssalbIO(:,:,:,:) - double precision, allocatable :: sp(:,:) - double precision, allocatable :: msl(:,:) - double precision, allocatable :: t2m(:,:) - double precision, allocatable :: d2m(:,:) - double precision, allocatable :: tcc(:,:) - double precision, allocatable :: w10(:,:) - double precision, allocatable :: tclw(:,:) - double precision, allocatable :: tco3(:,:) - double precision, allocatable :: cdrem(:,:) - double precision, allocatable :: cldtcm(:,:) - double precision, allocatable :: taua(:,:,:) - double precision, allocatable :: asymp(:,:,:) - double precision, allocatable :: ssalb(:,:,:) + double precision, allocatable,target :: sp(:,:) + double precision, allocatable,target :: msl(:,:) + double precision, allocatable,target :: t2m(:,:) + double precision, allocatable,target :: d2m(:,:) + double precision, allocatable,target :: tcc(:,:) + double precision, allocatable,target :: w10(:,:) + double precision, allocatable,target :: tclw(:,:) + double precision, allocatable,target :: tco3(:,:) + double precision, allocatable,target :: cdrem(:,:) + double precision, allocatable,target :: cldtcm(:,:) + double precision, allocatable,target :: taua(:,:,:) + double precision, allocatable,target :: asymp(:,:,:) + double precision, allocatable,target :: ssalb(:,:,:) ! FABM optical model variables - double precision, allocatable :: surface_downwelling_shortwave_flux(:,:) - double precision, allocatable :: atmosphere_mass_content_of_water_vapor(:,:) - double precision, allocatable :: visibility_in_air(:,:) - double precision, allocatable :: aerosol_air_mass_type(:,:) - double precision, allocatable :: surface_specific_humidity(:,:) + double precision, allocatable, target :: surface_downwelling_shortwave_flux(:,:) + double precision, allocatable, target :: atmosphere_mass_content_of_water_vapor(:,:) + double precision, allocatable, target :: visibility_in_air(:,:) + double precision, allocatable, target :: aerosol_air_mass_type(:,:) + double precision, allocatable, target :: surface_specific_humidity(:,:) ! ############ real, allocatable :: zkef_f (:,:) diff --git a/src/BIO/BIO_mem.f90 b/src/BIO/BIO_mem.f90 index 4249052d..aeba89ac 100644 --- a/src/BIO/BIO_mem.f90 +++ b/src/BIO/BIO_mem.f90 @@ -59,10 +59,13 @@ END subroutine initialize_FABM #endif subroutine myalloc_BIO() + USE calendar INTEGER :: err INTEGER :: ivar INTEGER :: ji,jj + INTEGER :: year, month, day + double precision :: sec double precision :: aux_mem #ifdef key_trc_fabm type (type_fabm_interior_variable_id) :: interior_id @@ -145,7 +148,7 @@ subroutine myalloc_BIO() horizontal_id=model_fabm%get_horizontal_variable_id('surface_downwelling_shortwave_flux') ! to be provided in case monospectral formulation is used - surface_downwelling_shortwave_flux=1.0d0 + surface_downwelling_shortwave_flux=500.0d0 call model_fabm%link_horizontal_data(horizontal_id, surface_downwelling_shortwave_flux) ! W m^-2 horizontal_id = model_fabm%get_horizontal_variable_id('atmosphere_mass_content_of_water_vapor') @@ -171,7 +174,7 @@ subroutine myalloc_BIO() call model_fabm%link_horizontal_data(horizontal_id, sp) ! - Pa id_yearday = model_fabm%get_scalar_variable_id(fabm_standard_variables%number_of_days_since_start_of_the_year) - call model_fabm%link_scalar(id_yearday, 1.0d0) ! - days + call model_fabm%link_scalar(id_yearday, 1.5d0) ! - days ! Complete initialization and check whether FABM has all dependencies fulfilled diff --git a/src/General/memory.f90 b/src/General/memory.f90 index e51615f7..e1d587cf 100644 --- a/src/General/memory.f90 +++ b/src/General/memory.f90 @@ -99,7 +99,7 @@ MODULE myalloc !! ff : coriolis factor - double precision, allocatable, dimension(:,:) :: totglamt, glamu, glamv,glamf , glamt + double precision, allocatable, target, dimension(:,:) :: totglamt, glamu, glamv,glamf , glamt double precision, allocatable, dimension(:,:) :: totgphit, gphiu, gphiv,gphif , gphit double precision, allocatable, dimension(:,:) :: e1t, e1u, e1v, e1f double precision, allocatable, dimension(:,:) :: e2t, e2u, e2v, e2f, ff @@ -122,7 +122,7 @@ MODULE myalloc double precision, allocatable :: gdept(:,:,:), gdepw(:) #endif - double precision, allocatable,dimension(:,:,:), save :: e3t, e3t_back, e3u, e3v, e3w + double precision, allocatable,dimension(:,:,:),target, save :: e3t, e3t_back, e3u, e3v, e3w double precision, allocatable,dimension(:,:,:), save :: e3t_0, e3u_0, e3v_0, e3w_0 double precision, allocatable :: spongeT(:,:) , spongeVel(:,:,:) @@ -166,8 +166,8 @@ MODULE myalloc !! rhopn : potential volumic mass (kg m-3) !! bn2n : brunt-vaisala frequency (s-2) !! - double precision, allocatable, dimension(:,:,:) :: un, vn, wn - double precision, allocatable, dimension(:,:,:) :: tn, sn,rdn,rhopn,rho + double precision, allocatable, target, dimension(:,:,:) :: un, vn, wn + double precision, allocatable, target, dimension(:,:,:) :: tn, sn,rdn,rhopn,rho @@ -291,10 +291,10 @@ MODULE myalloc INTEGER flagSMS_Dyn ! Flag time advance SMS or Dyn - double precision, allocatable :: trn(:,:,:,:) - double precision, allocatable :: tra(:,:,:,:) - double precision, allocatable :: tra_DIA(:,:,:,:) - double precision, allocatable :: tra_DIA_2d(:,:,:) + double precision, allocatable, target :: trn(:,:,:,:) + double precision, allocatable, target :: tra(:,:,:,:) + double precision, allocatable, target :: tra_DIA(:,:,:,:) + double precision, allocatable, target :: tra_DIA_2d(:,:,:) double precision, allocatable :: traIO(:,:,:,:) double precision, allocatable :: traIO_HIGH(:,:,:,:) double precision, allocatable :: snIO(:,:,:) @@ -382,7 +382,7 @@ MODULE myalloc # endif LOGICAL IS_FREE_SURFACE - LOGICAL lbfm ! activates bfm model + LOGICAL lbgc ! activates bfm model LOGICAL latmosph ! activates atmospheric deposition From 9e190453352c16fb0c519ab8cc0e84d6560432eb Mon Sep 17 00:00:00 2001 From: Paolo Lazzari Date: Fri, 6 Mar 2026 18:28:50 +0100 Subject: [PATCH 60/97] setting diagnostic write default to -> false --- src/BIO/trclec.f90 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/BIO/trclec.f90 b/src/BIO/trclec.f90 index a8235418..16a4c2f1 100644 --- a/src/BIO/trclec.f90 +++ b/src/BIO/trclec.f90 @@ -85,7 +85,7 @@ SUBROUTINE trclec end do ! Interior diagnostic variables features and dump frequency diahf(:) = 0 - diaWR(:) = 1 + diaWR(:) = 0 do i = 1, size(model_fabm%interior_diagnostic_variables) dianm(i) = model_fabm%interior_diagnostic_variables(i)%name diaun(i) = model_fabm%interior_diagnostic_variables(i)%units @@ -114,7 +114,7 @@ SUBROUTINE trclec end do ! Horizontal diagnostic variables features and dump frequency diahf_2d(:) = 0 - diaWR_2d(:) = 1 + diaWR_2d(:) = 0 do i = 1, size(model_fabm%horizontal_diagnostic_variables) dianm_2d(i) = model_fabm%horizontal_diagnostic_variables(i)%name diaun_2d(i) = model_fabm%horizontal_diagnostic_variables(i)%units From 44db032496cb00c90f4bb819a8264f60e38bbd80 Mon Sep 17 00:00:00 2001 From: Paolo Lazzari Date: Wed, 11 Mar 2026 14:53:24 +0100 Subject: [PATCH 61/97] add momentary write --- src/BIO/trcbio_fabm.F90 | 22 +++++++++++----------- src/BIO/trclec.f90 | 17 +++++++++++------ 2 files changed, 22 insertions(+), 17 deletions(-) diff --git a/src/BIO/trcbio_fabm.F90 b/src/BIO/trcbio_fabm.F90 index 78040866..26e54a0e 100644 --- a/src/BIO/trcbio_fabm.F90 +++ b/src/BIO/trcbio_fabm.F90 @@ -110,31 +110,31 @@ SUBROUTINE trcbio_fabm(datestring) DO jn=1,size(model_fabm%interior_diagnostic_variables) IF (model_fabm%interior_diagnostic_variables(jn)%save) THEN - write(*,*) 'jn=', jn - write(*,*) 'Name of diagnostic variable:', TRIM(model_fabm%interior_diagnostic_variables(jn)%name) - write(*,*) 'Shape of get_interior_diagnostic_data(jn):', shape(model_fabm%get_interior_diagnostic_data(jn)) - write(*,*) 'Shape of tra_DIA(jn,:,:,:):', shape(tra_DIA(jn,:,:,:)) + write(*,*) 'jn=', jn + write(*,*) 'Name of diagnostic variable:', TRIM(model_fabm%interior_diagnostic_variables(jn)%name) + write(*,*) 'Shape of get_interior_diagnostic_data(jn):', shape(model_fabm%get_interior_diagnostic_data(jn)) + write(*,*) 'Shape of tra_DIA(jn,:,:,:):', shape(tra_DIA(jn,:,:,:)) + write(*,*) 'Value of tra_DIA(jn,:,:,:):', tra_DIA(jn,1,5,5) tra_DIA(jn, : , : ,:) = model_fabm%get_interior_diagnostic_data(jn) ELSE tra_DIA(jn, : , :, :) = 0. END IF - write(*,*) 'Value of tra_DIA(jn,:,:,:):', tra_DIA(jn,1,5,5) END DO DO jn=1,size(model_fabm%horizontal_diagnostic_variables) IF (model_fabm%horizontal_diagnostic_variables(jn)%save) THEN - write(*,*) 'jn=', jn - write(*,*) 'Name of diagnostic variable:', TRIM(model_fabm%horizontal_diagnostic_variables(jn)%name) - write(*,*) 'Shape of get_horizontal_diagnostic_data(jn):', shape(model_fabm%get_horizontal_diagnostic_data(jn)) - write(*,*) 'Shape of tra_DIA_2d(jn,:,:):', shape(tra_DIA_2d(jn,:,:)) + write(*,*) 'jn=', jn + write(*,*) 'Name of diagnostic variable:', TRIM(model_fabm%horizontal_diagnostic_variables(jn)%name) + write(*,*) 'Shape of get_horizontal_diagnostic_data(jn):', shape(model_fabm%get_horizontal_diagnostic_data(jn)) + write(*,*) 'Shape of tra_DIA_2d(jn,:,:):', shape(tra_DIA_2d(jn,:,:)) tra_DIA_2d(jn, :, :) = model_fabm%get_horizontal_diagnostic_data(jn) + write(*,*) 'Value of tra_DIA_2d(jn,:,:):', tra_DIA_2d(jn,5,5) ELSE tra_DIA_2d(jn, :, :) = 0. END IF - write(*,*) 'Value of tra_DIA_2d(jn,:,:):', tra_DIA_2d(jn,5,5) END DO @@ -142,7 +142,7 @@ SUBROUTINE trcbio_fabm(datestring) ! BEGIN BC_REFACTORING SECTION ! --------------------------------------------------------------------- - call boundaries%fix_diagnostic_vars(tra_DIA, tra_DIA_2d) + call boundaries%fix_diagnostic_vars(tra_DIA, tra_DIA_2d) ! ---------------------------------------------------------------------- ! END BC_REFACTORING SECTION diff --git a/src/BIO/trclec.f90 b/src/BIO/trclec.f90 index 16a4c2f1..4b05523a 100644 --- a/src/BIO/trclec.f90 +++ b/src/BIO/trclec.f90 @@ -95,11 +95,14 @@ SUBROUTINE trclec do i = 1, size(model_fabm%interior_diagnostic_variables) if ( trim(model_fabm%interior_diagnostic_variables(i)%name) .EQ. trim(cfg%interior_diagnostic(j)%name)) then nmatch = nmatch + 1 - write(*,'(a)') " - "//trim(cfg%interior_diagnostic(j)%name) - write(*,'(a,1x,i0)') " diahf:", cfg%interior_diagnostic(j)%diahf diahf(i)=cfg%interior_diagnostic(j)%diahf - write(*,'(a,1x,i0)') " diaWR:", cfg%interior_diagnostic(j)%diaWR diaWR(i)=cfg%interior_diagnostic(j)%diaWR + IF (diaWR(i)>0) THEN + write(*,'(a)') " - "//trim(cfg%interior_diagnostic(j)%name) + write(*,'(a,1x,i0)') " diahf:", cfg%interior_diagnostic(j)%diahf + write(*,'(a,1x,i0)') " diaWR:", cfg%interior_diagnostic(j)%diaWR + END IF + endif end do if (nmatch == 0) then @@ -124,11 +127,13 @@ SUBROUTINE trclec do i = 1, size(model_fabm%horizontal_diagnostic_variables) if ( trim(model_fabm%horizontal_diagnostic_variables(i)%name) .EQ. trim(cfg%horizontal_diagnostic(j)%name)) then nmatch = nmatch + 1 - write(*,'(a)') " - "//trim(cfg%horizontal_diagnostic(j)%name) - write(*,'(a,1x,i0)') " diahf_2d:", cfg%horizontal_diagnostic(j)%diahf_2d diahf_2d(i)=cfg%horizontal_diagnostic(j)%diahf_2d - write(*,'(a,1x,i0)') " diaWR_2d:", cfg%horizontal_diagnostic(j)%diaWR_2d diaWR_2d(i)=cfg%horizontal_diagnostic(j)%diaWR_2d + if (diaWR_2d(i)>0) then + write(*,'(a)') " - "//trim(cfg%horizontal_diagnostic(j)%name) + write(*,'(a,1x,i0)') " diahf_2d:", cfg%horizontal_diagnostic(j)%diahf_2d + write(*,'(a,1x,i0)') " diaWR_2d:", cfg%horizontal_diagnostic(j)%diaWR_2d + end if endif end do if (nmatch == 0) then From e660ddc102329247cfc5932c2d33aee7efa18a2b Mon Sep 17 00:00:00 2001 From: Paolo Lazzari Date: Wed, 11 Mar 2026 14:54:01 +0100 Subject: [PATCH 62/97] graphic interface to configure ogstm.yaml --- testcase/create_ogstm_yaml.py | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/testcase/create_ogstm_yaml.py b/testcase/create_ogstm_yaml.py index b2b646f6..cb3d8235 100644 --- a/testcase/create_ogstm_yaml.py +++ b/testcase/create_ogstm_yaml.py @@ -26,12 +26,14 @@ f.write('interior_diagnostic:\n') for variable in model.interior_diagnostic_variables: - f.write(f" {variable.name.replace('/','_')}:\n") - f.write(f" diahf: 0\n") - f.write(f" diaWR: 0\n") + if variable.output: + f.write(f" {variable.name.replace('/','_')}:\n") + f.write(f" diahf: 0\n") + f.write(f" diaWR: 0\n") f.write('horizontal_diagnostic:\n') for variable in model.horizontal_diagnostic_variables: - f.write(f" {variable.name.replace('/','_')}:\n") - f.write(f" diahf_2d: 0\n") - f.write(f" diaWR_2d: 0\n") + if variable.output: + f.write(f" {variable.name.replace('/','_')}:\n") + f.write(f" diahf_2d: 0\n") + f.write(f" diaWR_2d: 0\n") From 443006f9a44b07f2f4c2f00784058f9d3c30cd7b Mon Sep 17 00:00:00 2001 From: Paolo Lazzari Date: Tue, 24 Mar 2026 08:42:17 +0100 Subject: [PATCH 63/97] Adding trcave alternative subroutine for FABM --- src/General/step.f90 | 7 + src/PHYS/trcave.f90 | 3 +- src/PHYS/trcave_fabm.f90 | 300 +++++++++++++++++++++++++++++++++++++++ 3 files changed, 309 insertions(+), 1 deletion(-) create mode 100644 src/PHYS/trcave_fabm.f90 diff --git a/src/General/step.f90 b/src/General/step.f90 index 178d51e7..7265f36e 100644 --- a/src/General/step.f90 +++ b/src/General/step.f90 @@ -172,7 +172,14 @@ SUBROUTINE step ! Call Passive tracer model between synchronization for small parallelisation CALL trcstp(DATEstring) ! se commento questo non fa calcoli + +#ifndef key_trc_bfm call trcave(DATEstring) +#endif + +#ifdef key_trc_fabm + call trcave_fabm(DATEstring) +#endif elapsed_time_1 = elapsed_time_1 + rdt elapsed_time_2 = elapsed_time_2 + rdt diff --git a/src/PHYS/trcave.f90 b/src/PHYS/trcave.f90 index 45bf0d25..66a5da8a 100644 --- a/src/PHYS/trcave.f90 +++ b/src/PHYS/trcave.f90 @@ -1,4 +1,5 @@ SUBROUTINE trcave(datestring) +#ifndef key_trc_fabm USE myalloc USE IO_mem USE FN_mem @@ -279,6 +280,6 @@ SUBROUTINE trcave(datestring) elapsed_time_3 = elapsed_time_3 + rdt ! increased here instead of in step.f90 endif - +#endif ! key_trc_fabm END SUBROUTINE trcave diff --git a/src/PHYS/trcave_fabm.f90 b/src/PHYS/trcave_fabm.f90 new file mode 100644 index 00000000..274cc8a7 --- /dev/null +++ b/src/PHYS/trcave_fabm.f90 @@ -0,0 +1,300 @@ + SUBROUTINE trcave_fabm(datestring) +#ifdef key_trc_fabm + USE myalloc + USE IO_mem + USE FN_mem + USE OPT_mem + USE TIME_MANAGER + use mpi + use BIO_mem + + implicit none + character(LEN=17), INTENT(IN) :: datestring +! local + integer jk,jj,ji,jn + integer :: jn_high, jn_on_all + double precision :: Miss_val =1.e20 + double precision :: elapsed_time, inv_incremented_time + integer :: year, month, day, ihr + double precision :: sec + + ave_partTime = MPI_WTIME() + + +! FIRST, LOW FREQUENCY + elapsed_time = elapsed_time_2 + inv_incremented_time = 1./(elapsed_time_2 + rdt) + + DO jn=1 ,jptra + + DO ji=1, jpi + DO jj=1, jpj + DO jk=1, jpk + IF(tmask(jk,jj,ji) .NE. 0.) THEN + traIO(jk,jj,ji,jn ) = (traIO(jk,jj,ji,jn)*elapsed_time + trn(jk,jj,ji,jn)*rdt)*inv_incremented_time + ELSE + traIO(jk,jj,ji,jn )=Miss_val + ENDIF + END DO + END DO + END DO + + END DO + + + + + + elapsed_time = elapsed_time_1 + inv_incremented_time = 1./(elapsed_time_1 + rdt)! ****************** HIGH FREQUENCY + DO jn_high=1 ,jptra_high + + + + + jn_on_all = highfreq_table(jn_high) + DO ji=1, jpi + DO jj=1, jpj + DO jk=1, jpk + IF(tmask(jk,jj,ji) .NE. 0.) THEN + traIO_HIGH(jk,jj,ji,jn_high )= & + & (traIO_HIGH(jk,jj,ji,jn_high )*elapsed_time+trn(jk,jj,ji,jn_on_all)*rdt)*inv_incremented_time + ELSE + traIO_HIGH(jk,jj,ji,jn_high )=Miss_val + ENDIF + END DO + END DO + END DO + + + END DO + + +! ***************** PHYS ***************************************************** + if (freq_ave_phys.eq.1) then + elapsed_time = elapsed_time_1 + inv_incremented_time = 1./(elapsed_time_1 + rdt) + else + elapsed_time = elapsed_time_2 + inv_incremented_time = 1./(elapsed_time_2 + rdt) + endif + + + DO ji=1, jpi + DO jj=1, jpj + DO jk=1, jpk + IF(tmask(jk,jj,ji) .NE. 0.) THEN + snIO (jk,jj,ji)=(snIO (jk,jj,ji)*elapsed_time+sn (jk,jj,ji)*rdt)*inv_incremented_time + tnIO (jk,jj,ji)=(tnIO (jk,jj,ji)*elapsed_time+tn (jk,jj,ji)*rdt)*inv_incremented_time + wnIO (jk,jj,ji)=(wnIO (jk,jj,ji)*elapsed_time+wn (jk,jj,ji)*rdt)*inv_incremented_time + avtIO(jk,jj,ji)=(avtIO(jk,jj,ji)*elapsed_time+avt(jk,jj,ji)*rdt)*inv_incremented_time + e3tIO(jk,jj,ji)=(e3tIO(jk,jj,ji)*elapsed_time+e3t(jk,jj,ji)*rdt)*inv_incremented_time + ELSE + snIO (jk,jj,ji)=Miss_val + tnIO (jk,jj,ji)=Miss_val + wnIO (jk,jj,ji)=Miss_val + avtIO(jk,jj,ji)=Miss_val + e3tIO(jk,jj,ji)=Miss_val + ENDIF + + + IF(umask(jk,jj,ji) .NE. 0.) THEN + unIO(jk,jj,ji)=(unIO(jk,jj,ji)*elapsed_time+un(jk,jj,ji)*rdt)*inv_incremented_time + ELSE + unIO(jk,jj,ji)=Miss_val + ENDIF + + + IF(vmask(jk,jj,ji) .NE. 0.) THEN + vnIO(jk,jj,ji)=(vnIO(jk,jj,ji)*elapsed_time+vn(jk,jj,ji)*rdt)*inv_incremented_time + ELSE + vnIO(jk,jj,ji)=Miss_val + ENDIF + + END DO + END DO + END DO + + DO jj=1, jpj + DO ji=1, jpi + IF (tmask(1,jj,ji) .NE. 0.) THEN + vatmIO(jj,ji)=(vatmIO(jj,ji)*elapsed_time+vatm(jj,ji)*rdt)*inv_incremented_time + empIO (jj,ji)=(empIO (jj,ji)*elapsed_time+emp (jj,ji)*rdt)*inv_incremented_time + qsrIO (jj,ji)=(qsrIO (jj,ji)*elapsed_time+qsr (jj,ji)*rdt)*inv_incremented_time + ELSE + vatmIO(jj,ji)=Miss_val + empIO (jj,ji)=Miss_val + qsrIO (jj,ji)=Miss_val + ENDIF + END DO + END DO + + +! ***************** END PHYS ************************************************* + + +! ***************** DIAGNOSTICS ********************************************** + + if (lbgc) THEN +! FIRST, LOW FREQUENCY + + elapsed_time = elapsed_time_2 + inv_incremented_time = 1./(elapsed_time_2 + rdt) + + + DO jn=1 ,jptra_dia + IF (model_fabm%interior_diagnostic_variables(jn)%save) THEN + DO ji=1, jpi + DO jj=1, jpj + DO jk=1, jpk + IF(tmask(jk,jj,ji) .NE. 0.) THEN + tra_DIA_IO(jn)%data(jk,jj,ji)=(tra_DIA_IO(jn)%data(jk,jj,ji)*elapsed_time+tra_DIA(jn)%data(jk,jj,ji)*rdt)*inv_incremented_time + ELSE + tra_DIA_IO(jn)%data(jk,jj,ji)=Miss_val + ENDIF + END DO + END DO + END DO + ENDIF + END DO + +! ********************* DIAGNOSTICS 2D ********** + + DO jn=1 ,jptra_dia_2d + IF (model_fabm%horizontal_diagnostic_variables(jn)%save) THEN + DO ji=1, jpi + DO jj=1, jpj + IF(tmask(1,jj,ji) .NE. 0.) THEN ! Warning ! Tested only for surface + tra_DIA_2d_IO(jn)%data(jj,ji)=(tra_DIA_2d_IO(jn)%data(jj,ji)*elapsed_time+ & + tra_DIA_2d(jn)%data(jj,ji)*rdt)*inv_incremented_time + ELSE + tra_DIA_2d_IO(jn)%data(jj,ji)=Miss_val + ENDIF + END DO + END DO + ENDIF + END DO + + + + + elapsed_time = elapsed_time_1 ! ****************** HIGH FREQUENCY + inv_incremented_time = 1./(elapsed_time_1 + rdt) + + + if (jptra_dia_high.gt.0) THEN + DO ji=1, jpi + DO jj=1, jpj + DO jk=1, jpk + DO jn_high=1, jptra_dia_high + jn_on_all = highfreq_table_dia(jn_high ) + write(*,*) 'jn_on_all', jn_on_all + write(*,*) 'jn_high', jn_high + + IF (model_fabm%interior_diagnostic_variables(jn_on_all)%save) THEN + IF(tmask(jk,jj,ji) .NE. 0.) THEN + tra_DIA_IO_HIGH(jn_high)%data(jk,jj,ji)= & + & (tra_DIA_IO_HIGH(jn_high)%data(jk,jj,ji)*elapsed_time+tra_DIA(jn_on_all)%data(jk,jj,ji)*rdt)*inv_incremented_time + ELSE + tra_DIA_IO_HIGH(jn_high)%data(jk,jj,ji)=Miss_val + ENDIF + ENDIF + write(*,*) 'tra_DIA_IO_HIGH', tra_DIA_IO_HIGH(jn_high)%data(jk,jj,ji) + write(*,*) 'tra_DIA', tra_DIA(jn_on_all)%data(jk,jj,ji) + END DO + END DO + END DO + END DO + endif + + +! ********************* DIAGNOSTICS 2D ********** + + + if (jptra_dia2d_high.gt.0) THEN + DO ji=1, jpi + DO jj=1, jpj + IF(tmask(1,jj,ji) .NE. 0.) THEN + DO jn_high=1, jptra_dia2d_high + jn_on_all = highfreq_table_dia2d(jn_high) + tra_DIA_2d_IO_HIGH(jn_high)%data(jj,ji)= & + & (tra_DIA_2d_IO_HIGH(jn_high)%data(jj,ji)*elapsed_time+tra_DIA_2d(jn_on_all)%data(jj,ji)*rdt)*inv_incremented_time + enddo + ELSE + DO jn_high=1, jptra_dia2d_high + tra_DIA_2d_IO_HIGH(jn_high)%data(jj,ji)=Miss_val + END DO + ENDIF + END DO + END DO + endif + + + endif ! lfbm + + ave_partTime = MPI_WTIME() - ave_partTime + ave_TotTime = ave_TotTime + ave_partTime + + +! ********************* DIAGNOSTICS RT ********** + + call read_date_string(datestring, year, month, day, sec) + +! ihr = int(sec/3600.d0) ! from 0 to 23 + + if (( sec .GE. 9.9D0*3600.0d0) .AND. ( sec .LT. 13.9D0*3600.0D0)) then + elapsed_time = elapsed_time_3 + inv_incremented_time = 1./(elapsed_time_3 + rdt) + + + DO jn=1, nlt + DO ji=1, jpi + DO jj=1, jpj + DO jk=1, jpk + IF (opt_mask(jk,jj,ji)) THEN + Ed_IO(jk,jj,ji,jn) = (Ed_IO(jk,jj,ji,jn)*elapsed_time + Ed(jk,jj,ji,jn)*rdt)*inv_incremented_time + ELSE + Ed_IO(jk,jj,ji,: )=Miss_val + ENDIF + END DO + END DO + END DO + END DO + + DO jn=1, nlt + DO ji=1, jpi + DO jj=1, jpj + DO jk=1, jpk + IF (opt_mask(jk,jj,ji)) THEN + Es_IO(jk,jj,ji,jn) = (Es_IO(jk,jj,ji,jn)*elapsed_time + Es(jk,jj,ji,jn)*rdt)*inv_incremented_time + ELSE + Es_IO(jk,jj,ji,: )=Miss_val + ENDIF + END DO + END DO + END DO + END DO + + DO jn=1, nlt + DO ji=1, jpi + DO jj=1, jpj + DO jk=1, jpk + IF (opt_mask(jk,jj,ji)) THEN + Eu_IO(jk,jj,ji,jn) = (Eu_IO(jk,jj,ji,jn)*elapsed_time + Eu(jk,jj,ji,jn)*rdt)*inv_incremented_time + ELSE + Eu_IO(jk,jj,ji,: )=Miss_val + ENDIF + END DO + END DO + END DO + END DO + + + + + + elapsed_time_3 = elapsed_time_3 + rdt ! increased here instead of in step.f90 + endif +#endif + END SUBROUTINE trcave_fabm + From 97e1a7758ae5c6f3009234f7a49cfd7a6caac52e Mon Sep 17 00:00:00 2001 From: Paolo Lazzari Date: Tue, 24 Mar 2026 08:46:06 +0100 Subject: [PATCH 64/97] deactivaded recovery of diagnostics from restart in FABM --- src/IO/trcrst.f90 | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/IO/trcrst.f90 b/src/IO/trcrst.f90 index e210f639..20976949 100644 --- a/src/IO/trcrst.f90 +++ b/src/IO/trcrst.f90 @@ -15,6 +15,7 @@ SUBROUTINE trcrst USE myalloc USE TIME_MANAGER USE IO_MEM , ONLY : elapsed_time_1, elapsed_time_2, existFilebkp + USE BIO_mem IMPLICIT NONE @@ -103,6 +104,7 @@ SUBROUTINE trcrst ! ******************** 3D DIAGNOSTICS *********************************** +#ifdef key_trc_bfm jn_high=0 DO jn=1, jptra_dia @@ -139,10 +141,10 @@ SUBROUTINE trcrst ENDIF END DO - +#endif ! ******************** 2D DIAGNOSTICS *********************************** - +#ifdef key_trc_bfm jn_high=0 DO jn=1, jptra_dia_2d @@ -183,7 +185,7 @@ SUBROUTINE trcrst END DO - +#endif if(freq_ave_phys .eq. 1) then From d49ec833a4689883513af5d5528d4d69152bad9c Mon Sep 17 00:00:00 2001 From: Paolo Lazzari Date: Tue, 24 Mar 2026 08:48:56 +0100 Subject: [PATCH 65/97] added improved diagnostic allocation according to what is dumped by user, correction of linking functions in FABM initialization by passing pure memeory address --- src/BIO-OPTICS/OPT_mem.f90 | 1 + src/BIO/BIO_mem.f90 | 75 ++++++++++++++++++++++++++++++++++++-- src/BIO/trcbio_fabm.F90 | 66 ++++++++++++++++++++++----------- src/General/memory.f90 | 59 ++++++++++++++++++++++++++---- src/IO/diadump.f90 | 61 +++++++++++++++++++++++++++++-- 5 files changed, 227 insertions(+), 35 deletions(-) diff --git a/src/BIO-OPTICS/OPT_mem.f90 b/src/BIO-OPTICS/OPT_mem.f90 index 633943fd..3ed84611 100644 --- a/src/BIO-OPTICS/OPT_mem.f90 +++ b/src/BIO-OPTICS/OPT_mem.f90 @@ -48,6 +48,7 @@ MODULE OPT_mem double precision, allocatable,target :: asymp(:,:,:) double precision, allocatable,target :: ssalb(:,:,:) ! FABM optical model variables + double precision, target :: yearday double precision, allocatable, target :: surface_downwelling_shortwave_flux(:,:) double precision, allocatable, target :: atmosphere_mass_content_of_water_vapor(:,:) double precision, allocatable, target :: visibility_in_air(:,:) diff --git a/src/BIO/BIO_mem.f90 b/src/BIO/BIO_mem.f90 index aeba89ac..6d3c5d9f 100644 --- a/src/BIO/BIO_mem.f90 +++ b/src/BIO/BIO_mem.f90 @@ -63,7 +63,7 @@ subroutine myalloc_BIO() INTEGER :: err INTEGER :: ivar - INTEGER :: ji,jj + INTEGER :: ji,jj,jn INTEGER :: year, month, day double precision :: sec double precision :: aux_mem @@ -128,7 +128,9 @@ subroutine myalloc_BIO() ! For this list, visit https://fabm.net/standard_variables call model_fabm%link_interior_data(fabm_standard_variables%temperature, tn) ! Celsius + write(*,*) 'tn', tn call model_fabm%link_interior_data(fabm_standard_variables%practical_salinity, sn) ! PSU + write(*,*) 'sn', sn call model_fabm%link_interior_data(fabm_standard_variables%density, rho) ! kg m-3 call model_fabm%link_interior_data(fabm_standard_variables%pressure, gdept) ! dbar call model_fabm%link_horizontal_data(fabm_standard_variables%mole_fraction_of_carbon_dioxide_in_air, ogstm_co2) ! CO2 Mixing Ratios (ppm) @@ -139,7 +141,7 @@ subroutine myalloc_BIO() call model_fabm%link_horizontal_data(fabm_standard_variables%latitude, gphit) ! degree_north horizontal_id = model_fabm%get_horizontal_variable_id('cloud_area_fraction') - call model_fabm%link_horizontal_data(horizontal_id, tcc/100.d0) ! [0-1] + call model_fabm%link_horizontal_data(horizontal_id, tcc) ! [0-1] horizontal_id = model_fabm%get_horizontal_variable_id('atmosphere_mass_content_of_cloud_liquid_water') @@ -174,13 +176,33 @@ subroutine myalloc_BIO() call model_fabm%link_horizontal_data(horizontal_id, sp) ! - Pa id_yearday = model_fabm%get_scalar_variable_id(fabm_standard_variables%number_of_days_since_start_of_the_year) - call model_fabm%link_scalar(id_yearday, 1.5d0) ! - days + yearday = 1.5d0 + call model_fabm%link_scalar(id_yearday, yearday) ! - days ! Complete initialization and check whether FABM has all dependencies fulfilled ! (i.e., whether all required calls to model%link_*_data have been made) write(*,*) 'Finalize initialization and check whether FABM has all dependencies fulfilled ...' + +! reduce diagnostis + + do jn = 1, size(model_fabm%interior_diagnostic_variables) + if (diaWR(jn) .EQ. 1) then + model_fabm%interior_diagnostic_variables(jn)%save = .TRUE. + else + model_fabm%interior_diagnostic_variables(jn)%save = .FALSE. + endif + enddo + + do jn = 1, size(model_fabm%horizontal_diagnostic_variables) + if (diaWR_2d(jn) .EQ. 1) then + model_fabm%horizontal_diagnostic_variables(jn)%save = .TRUE. + else + model_fabm%horizontal_diagnostic_variables(jn)%save = .FALSE. + endif + enddo + call model_fabm%start() write(*,*) 'done' @@ -192,7 +214,52 @@ subroutine myalloc_BIO() call model_fabm%initialize_interior_state(1, jpk, jj, ji) end do end do - +#ifdef key_trc_fabm + allocate(tra_DIA(jptra_dia)) + do jn=1,size(model_fabm%interior_diagnostic_variables) + if (model_fabm%interior_diagnostic_variables(jn)%save) then + allocate(tra_DIA(jn)%data(jpk,jpj,jpi)) + tra_DIA(jn)%data(:,:,:) = huge(tra_DIA(jn)%data(1,1,1)) + endif + end do + allocate(tra_DIA_2d(jptra_dia_2d)) + do jn=1,size(model_fabm%horizontal_diagnostic_variables) + if (model_fabm%horizontal_diagnostic_variables(jn)%save) then + allocate(tra_DIA_2d(jn)%data(jpj,jpi)) + tra_DIA_2d(jn)%data(:,:) = huge(tra_DIA_2d(jn)%data(1,1)) + endif + end do + allocate(tra_DIA_IO(jptra_dia)) + do jn=1,size(model_fabm%interior_diagnostic_variables) + if (model_fabm%interior_diagnostic_variables(jn)%save) then + allocate(tra_DIA_IO(jn)%data(jpk,jpj,jpi)) + tra_DIA_IO(jn)%data(:,:,:) = huge(tra_DIA_IO(jn)%data(1,1,1)) + endif + end do + + allocate(tra_DIA_IO_HIGH(jptra_dia_high)) + do jn=1, jptra_dia_high + if (model_fabm%interior_diagnostic_variables(highfreq_table_dia(jn))%save) then + allocate(tra_DIA_IO_HIGH(jn)%data(jpk,jpj,jpi)) + tra_DIA_IO_HIGH(jn)%data(:,:,:) = huge(tra_DIA_IO_HIGH(jn)%data(1,1,1)) + endif + end do + + allocate(tra_DIA_2d_IO(jptra_dia_2d)) + do jn=1,size(model_fabm%horizontal_diagnostic_variables) + if (model_fabm%horizontal_diagnostic_variables(jn)%save) then + allocate(tra_DIA_2d_IO(jn)%data(jpj,jpi)) + tra_DIA_2d_IO(jn)%data(:,:) = huge(tra_DIA_2d_IO(jn)%data(1,1)) + endif + end do + allocate(tra_DIA_2d_IO_HIGH(jptra_dia2d_high)) + do jn=1,jptra_dia2d_high + if (model_fabm%horizontal_diagnostic_variables(highfreq_table_dia2d(jn))%save) then + allocate(tra_DIA_2d_IO_HIGH(jn)%data(jpj,jpi)) + tra_DIA_2d_IO_HIGH(jn)%data(:,:) = huge(tra_DIA_2d_IO_HIGH(jn)%data(1,1)) + endif + end do +#endif ! At this point, initialization is complete. #endif diff --git a/src/BIO/trcbio_fabm.F90 b/src/BIO/trcbio_fabm.F90 index 26e54a0e..cda6e411 100644 --- a/src/BIO/trcbio_fabm.F90 +++ b/src/BIO/trcbio_fabm.F90 @@ -64,7 +64,7 @@ SUBROUTINE trcbio_fabm(datestring) integer :: jk,jj,ji,jn INTEGER :: year, month, day double precision :: sec - double precision :: yearday +! double precision :: yearday !!!---------------------------------------------------------------------- @@ -79,13 +79,30 @@ SUBROUTINE trcbio_fabm(datestring) ! Prepare all fields FABM needs to compute source terms (e.g., light) yearday = DAY_OF_THE_YEAR(datestring) -call model_fabm%link_scalar(fabm_standard_variables%number_of_days_since_start_of_the_year, yearday) +!call model_fabm%link_scalar(fabm_standard_variables%number_of_days_since_start_of_the_year, yearday) call model_fabm%prepare_inputs(SEC_FROM_START(datestring),year,month,day,sec) write(*,*) 'yearday: ', yearday write(*,*) 'SEC_FROM_START: ', SEC_FROM_START(datestring) write(*,*) 'year, month, day, sec: ', year, month, day, sec +write(*,*) 'tn',tn(1,:,:) +write(*,*) 'sn',sn(1,:,:) +write(*,*) 'rho',rho(1,:,:) +write(*,*) 'gdept',gdept(1,:,:) +write(*,*) 'mole_fraction_of_carbon_dioxide_in_air',ogstm_co2(:,:) +write(*,*) 'e3t',e3t(1,:,:) +write(*,*) 'vatm',vatm(:,:) +write(*,*) 'glamt',glamt(:,:) +write(*,*) 'tcc',tcc(:,:) +write(*,*) 'tclw',tclw(:,:) +write(*,*) 'atmosphere_mass_content_of_water_vapor',atmosphere_mass_content_of_water_vapor(:,:) +write(*,*) 'visibility_in_air',visibility_in_air(:,:) +write(*,*) 'aerosol_air_mass_type',aerosol_air_mass_type(:,:) +write(*,*) 'surface_specific_humidity',surface_specific_humidity(:,:) +write(*,*) 't2m',t2m(:,:) +write(*,*) 'sp',sp(:,:) + ! In the loops below, dy and w are local to the j,k point being processed. ! They would therefore need to be processed further within the loop to be included in ! the host's advection-diffusion-reaction treatment. @@ -110,30 +127,37 @@ SUBROUTINE trcbio_fabm(datestring) DO jn=1,size(model_fabm%interior_diagnostic_variables) IF (model_fabm%interior_diagnostic_variables(jn)%save) THEN - write(*,*) 'jn=', jn - write(*,*) 'Name of diagnostic variable:', TRIM(model_fabm%interior_diagnostic_variables(jn)%name) - write(*,*) 'Shape of get_interior_diagnostic_data(jn):', shape(model_fabm%get_interior_diagnostic_data(jn)) - write(*,*) 'Shape of tra_DIA(jn,:,:,:):', shape(tra_DIA(jn,:,:,:)) - write(*,*) 'Value of tra_DIA(jn,:,:,:):', tra_DIA(jn,1,5,5) - - tra_DIA(jn, : , : ,:) = model_fabm%get_interior_diagnostic_data(jn) - ELSE - tra_DIA(jn, : , :, :) = 0. + + tra_DIA(jn)%data = model_fabm%get_interior_diagnostic_data(jn) + + if (jn==11) THEN + write(*,*) 'jn=', jn + write(*,*) 'Name of diagnostic variable:', TRIM(model_fabm%interior_diagnostic_variables(jn)%name) + write(*,*) 'Shape of get_interior_diagnostic_data(jn):', shape(model_fabm%get_interior_diagnostic_data(jn)) + write(*,*) 'Shape of tra_DIA(jn,:,:,:):', shape(tra_DIA(jn)%data(:,:,:)) + do jk=1, jpk + write(*,*) 'Value of tra_DIA(jn,:,:,:):', tra_DIA(jn)%data(jk,:,:) + enddo + endif + END IF END DO DO jn=1,size(model_fabm%horizontal_diagnostic_variables) IF (model_fabm%horizontal_diagnostic_variables(jn)%save) THEN - write(*,*) 'jn=', jn - write(*,*) 'Name of diagnostic variable:', TRIM(model_fabm%horizontal_diagnostic_variables(jn)%name) - write(*,*) 'Shape of get_horizontal_diagnostic_data(jn):', shape(model_fabm%get_horizontal_diagnostic_data(jn)) - write(*,*) 'Shape of tra_DIA_2d(jn,:,:):', shape(tra_DIA_2d(jn,:,:)) - - tra_DIA_2d(jn, :, :) = model_fabm%get_horizontal_diagnostic_data(jn) - write(*,*) 'Value of tra_DIA_2d(jn,:,:):', tra_DIA_2d(jn,5,5) - ELSE - tra_DIA_2d(jn, :, :) = 0. +! write(*,*) 'jn=', jn +! write(*,*) 'Name of diagnostic variable:', TRIM(model_fabm%horizontal_diagnostic_variables(jn)%name) +! write(*,*) 'Shape of get_horizontal_diagnostic_data(jn):', shape(model_fabm%get_horizontal_diagnostic_data(jn)) +! write(*,*) 'Shape of tra_DIA_2d(jn,:,:):', shape(tra_DIA_2d(jn)%data(:,:)) + + tra_DIA_2d(jn)%data = model_fabm%get_horizontal_diagnostic_data(jn) + ! write(*,*) 'Value of tra_DIA_2d(jn,:,:):', tra_DIA_2d(jn)%data(5,5) + write(*,*) 'jn=', jn + write(*,*) 'Name of diagnostic variable:', TRIM(model_fabm%horizontal_diagnostic_variables(jn)%name) + write(*,*) 'Shape of get_horizontal_diagnostic_data(jn):', shape(model_fabm%get_horizontal_diagnostic_data(jn)) + write(*,*) 'Shape of tra_DIA_2d(jn,:,:):', shape(tra_DIA_2d(jn)%data(:,:)) + write(*,*) 'Value of tra_DIA_2d(jn,:,:):', tra_DIA_2d(jn)%data(:,:) END IF END DO @@ -142,7 +166,7 @@ SUBROUTINE trcbio_fabm(datestring) ! BEGIN BC_REFACTORING SECTION ! --------------------------------------------------------------------- - call boundaries%fix_diagnostic_vars(tra_DIA, tra_DIA_2d) +! call boundaries%fix_diagnostic_vars(tra_DIA, tra_DIA_2d) ! ---------------------------------------------------------------------- ! END BC_REFACTORING SECTION diff --git a/src/General/memory.f90 b/src/General/memory.f90 index e1d587cf..9fd320be 100644 --- a/src/General/memory.f90 +++ b/src/General/memory.f90 @@ -1,4 +1,4 @@ - MODULE myalloc +MODULE myalloc USE modul_param USE timers @@ -9,10 +9,27 @@ MODULE myalloc USE iso_c_binding #endif +#ifdef key_trc_fabm + USE fabm +#endif + IMPLICIT NONE public +#ifdef key_trc_fabm +type type_interior_variable_data + + double precision, allocatable :: data(:,:,:) + +end type +type type_horizontal_variable_data + + double precision, allocatable :: data(:,:) + +end type +#endif + !!---------------------------------------------------------------------- !! domain parameters !! --------------------------------------------------------------------- @@ -293,8 +310,14 @@ MODULE myalloc INTEGER flagSMS_Dyn ! Flag time advance SMS or Dyn double precision, allocatable, target :: trn(:,:,:,:) double precision, allocatable, target :: tra(:,:,:,:) +#if key_trc_bfm double precision, allocatable, target :: tra_DIA(:,:,:,:) double precision, allocatable, target :: tra_DIA_2d(:,:,:) +#endif +#if key_trc_fabm + type(type_interior_variable_data), allocatable :: tra_DIA(:) + type(type_horizontal_variable_data), allocatable :: tra_DIA_2d(:) +#endif double precision, allocatable :: traIO(:,:,:,:) double precision, allocatable :: traIO_HIGH(:,:,:,:) double precision, allocatable :: snIO(:,:,:) @@ -306,11 +329,19 @@ MODULE myalloc double precision, allocatable :: vnIO(:,:,:) double precision, allocatable :: wnIO(:,:,:) double precision, allocatable :: avtIO(:,:,:) - double precision, allocatable :: e3tIO(:,:,:) + double precision, allocatable :: e3tIO(:,:,:) +#ifdef key_trc_bfm double precision, allocatable :: tra_DIA_IO(:,:,:,:) double precision, allocatable :: tra_DIA_IO_HIGH(:,:,:,:) double precision, allocatable :: tra_DIA_2d_IO(:,:,:) double precision, allocatable :: tra_DIA_2d_IO_HIGH(:,:,:) +#endif +#ifdef key_trc_fabm + type(type_interior_variable_data), allocatable :: tra_DIA_IO(:) + type(type_interior_variable_data), allocatable :: tra_DIA_IO_HIGH(:) + type(type_horizontal_variable_data), allocatable :: tra_DIA_2d_IO(:) + type(type_horizontal_variable_data), allocatable :: tra_DIA_2d_IO_HIGH(:) +#endif double precision, allocatable :: tra_PHYS_IO(:,:,:,:) double precision, allocatable :: tra_PHYS_IO_HIGH(:,:,:,:) double precision, allocatable :: tra_PHYS_2d_IO(:,:,:) @@ -468,6 +499,8 @@ end subroutine myalloc_BFM subroutine alloc_tot() + + INTEGER :: jn INTEGER :: err double precision :: aux_mem @@ -679,11 +712,18 @@ subroutine alloc_tot() allocate(trn(jpk,jpj,jpi,jptra)) trn = huge(trn(1,1,1,1)) allocate(tra(jpk,jpj,jpi,jptra)) - tra = huge(trn(1,1,1,1)) + tra = huge(tra(1,1,1,1)) + +#ifdef key_trc_bfm allocate(tra_DIA(jptra_dia,jpk,jpj,jpi)) tra_DIA= huge(tra_DIA(1,1,1,1)) allocate(tra_DIA_2d(jptra_dia_2d,jpj,jpi)) tra_DIA_2d= huge(tra_DIA_2d(1,1,1)) +#endif + +#ifdef key_trc_fabm + ! allocation of tra_DIA and tra_DIA_2d is done moved to BIO_mem +#endif allocate(traIO(jpk,jpj,jpi,jptra)) traIO = huge(traIO(1,1,1,1)) allocate(snIO(jpk,jpj,jpi)) @@ -710,18 +750,23 @@ subroutine alloc_tot() buf = huge(buf(1,1,1)) allocate(buf2 (jpj,jpi)) buf2 = huge(buf2(1,1)) - allocate(tra_DIA_IO(jptra_dia,jpk,jpj,jpi)) - tra_DIA_IO = huge(tra_DIA_IO(1,1,1,1)) allocate(traIO_HIGH( jpk,jpj,jpi,jptra_HIGH)) traIO_HIGH = huge(traIO_HIGH(1,1,1,1)) + +#ifdef key_trc_bfm + allocate(tra_DIA_IO(jptra_dia,jpk,jpj,jpi)) + tra_DIA_IO = huge(tra_DIA_IO(1,1,1,1)) allocate(tra_DIA_IO_HIGH(jptra_dia_HIGH,jpk,jpj,jpi)) tra_DIA_IO_HIGH = huge(tra_DIA_IO_HIGH(1,1,1,1)) - allocate(tra_DIA_2d_IO(jptra_dia_2d, jpj,jpi)) tra_DIA_2d_IO = huge(tra_DIA_2d_IO(1,1,1)) allocate(tra_DIA_2d_IO_HIGH(jptra_dia2d_HIGH,jpj,jpi)) tra_DIA_2d_IO_HIGH = huge(tra_DIA_2d_IO_HIGH(1,1,1)) - +#endif + +#ifdef key_trc_fabm + ! allocation of tra_DIA_IO and tra_DIA_IO_HIGH is done moved to BIO_mem +#endif allocate(tra_PHYS_IO(jptra_phys,jpk,jpj,jpi)) tra_PHYS_IO = huge(tra_PHYS_IO(1,1,1,1)) allocate(tra_PHYS_IO_HIGH(jptra_phys,jpk,jpj,jpi)) diff --git a/src/IO/diadump.f90 b/src/IO/diadump.f90 index 76f81b27..7bd880db 100644 --- a/src/IO/diadump.f90 +++ b/src/IO/diadump.f90 @@ -11,13 +11,14 @@ SUBROUTINE diadump(datemean,datefrom,dateTo,FREQ_GROUP) USE MATRIX_VARS USE NODES_MODULE USE DTYPE_PROCS_STRING_MODULE + USE BIO_mem IMPLICIT NONE CHARACTER(LEN=17), INTENT(IN) :: datemean, dateFrom, dateTo INTEGER, INTENT(IN) :: FREQ_GROUP - INTEGER jk,jj,ji + INTEGER jk,jj,ji,jn INTEGER ind, i_contribution, j_contribution CHARACTER(10) newfile CHARACTER(LEN=42) forcing_file @@ -92,7 +93,12 @@ SUBROUTINE diadump(datemean,datefrom,dateTo,FREQ_GROUP) i_contribution = jpj * (ji-1) do jj =1 , jpj ind = jj + i_contribution +#ifdef key_trc_bfm buffDIA2d (ind)= tra_DIA_2d_IO(var_to_send_2D,jj,ji) +#endif +#ifdef key_trc_fabm + buffDIA2d (ind)= tra_DIA_2d_IO(var_to_send_2D)%data(jj,ji) +#endif enddo enddo else @@ -100,7 +106,12 @@ SUBROUTINE diadump(datemean,datefrom,dateTo,FREQ_GROUP) i_contribution = jpj * (ji-1) do jj = 1 , jpj ind = jj + i_contribution +#ifdef key_trc_bfm buffDIA2d (ind)= tra_DIA_2d_IO_high(COUNTER_VAR_HIGH_2d,jj,ji) +#endif +#ifdef key_trc_fabm + buffDIA2d (ind)= tra_DIA_2d_IO_high(COUNTER_VAR_HIGH_2d)%data(jj,ji) +#endif enddo enddo endif @@ -168,6 +179,7 @@ SUBROUTINE diadump(datemean,datefrom,dateTo,FREQ_GROUP) END IF END DO DUMPING_LOOP_2d +#ifdef key_trc_bfm if (.not.IsBackup) then if (FREQ_GROUP.eq.2) then tra_DIA_2d_IO(:,:,:) = 0. @@ -175,7 +187,22 @@ SUBROUTINE diadump(datemean,datefrom,dateTo,FREQ_GROUP) tra_DIA_2d_IO_HIGH(:,:,:) = 0. endif endif - +#endif +#ifdef key_trc_fabm + if (.not.IsBackup) then + if (FREQ_GROUP.eq.2) then + DO jn=1 ,jptra_dia_2d + IF (model_fabm%horizontal_diagnostic_variables(jn)%save) THEN + tra_DIA_2d_IO(jn)%data(:,:)=0. + ENDIF + END DO + else + DO jn=1, jptra_dia2d_high + tra_DIA_2d_IO_HIGH(jn)%data(:,:)= 0. + enddo + endif + endif +#endif !------------------------------------------------------------------------------------------------ if (WRITING_RANK_WR) tottrnIO = Miss_val @@ -222,7 +249,12 @@ SUBROUTINE diadump(datemean,datefrom,dateTo,FREQ_GROUP) j_contribution=jpk*(jj-1) do jk =1 , jpk ind = jk + j_contribution + i_contribution +#ifdef key_trc_bfm buffDIA(ind) = tra_DIA_IO(var_to_send, jk,jj,ji) +#endif +#ifdef key_trc_fabm + buffDIA(ind) = tra_DIA_IO(var_to_send)%data(jk,jj,ji) +#endif enddo enddo enddo @@ -233,7 +265,14 @@ SUBROUTINE diadump(datemean,datefrom,dateTo,FREQ_GROUP) j_contribution=jpk*(jj-1) do jk =1 , jpk ind = jk + j_contribution + i_contribution +#ifdef key_trc_bfm buffDIA(ind) = tra_DIA_IO_HIGH(COUNTER_VAR_diag_HIGH, jk,jj,ji) +#endif +#ifdef key_trc_fabm + write(*,*) 'CHECK_h_before', COUNTER_VAR_diag_HIGH + write(*,*) 'CHECK_h_before var_to_send', tra_DIA_IO_HIGH(COUNTER_VAR_diag_HIGH)%data(jk,jj,ji) + buffDIA(ind) = tra_DIA_IO_HIGH(COUNTER_VAR_diag_HIGH)%data(jk,jj,ji) +#endif enddo enddo enddo @@ -304,7 +343,7 @@ SUBROUTINE diadump(datemean,datefrom,dateTo,FREQ_GROUP) END IF END IF END DO DUMPING_LOOP_3d - +#ifdef key_trc_bfm if (.not.IsBackup) then if (FREQ_GROUP.eq.2) then tra_DIA_IO(:,:,:,:) = 0. @@ -312,6 +351,22 @@ SUBROUTINE diadump(datemean,datefrom,dateTo,FREQ_GROUP) tra_DIA_IO_HIGH(:,:,:,:) = 0. endif endif +#endif +#ifdef key_trc_fabm + if (.not.IsBackup) then + if (FREQ_GROUP.eq.2) then + DO jn=1 ,jptra_dia + IF (model_fabm%interior_diagnostic_variables(jn)%save) THEN + tra_DIA_IO(jn)%data(:,:,:)=0. + ENDIF + END DO + else + DO jn=1, jptra_dia_high + tra_DIA_IO_HIGH(jn)%data(:,:,:)= 0. + enddo + endif + endif +#endif !------------------------------------------------- ! ****************** PHYSC OUTPUT 2D ******************* From 8b1b078a9627c5fa73fba29720dd7c38f2c31769 Mon Sep 17 00:00:00 2001 From: Paolo Lazzari Date: Tue, 24 Mar 2026 09:15:41 +0100 Subject: [PATCH 66/97] ogstm.yaml creation with graphic interface --- testcase/create_ogstm_yaml_V2.py | 208 +++++++++++++++++++++++++++++++ 1 file changed, 208 insertions(+) create mode 100644 testcase/create_ogstm_yaml_V2.py diff --git a/testcase/create_ogstm_yaml_V2.py b/testcase/create_ogstm_yaml_V2.py new file mode 100644 index 00000000..7e699ef1 --- /dev/null +++ b/testcase/create_ogstm_yaml_V2.py @@ -0,0 +1,208 @@ +import os +import pyfabm +import tkinter as tk +from tkinter import ttk, messagebox + +CODEPATH = '../../' +CODEPATH = CODEPATH.replace("~", os.getenv("HOME")) +fabm_yaml = CODEPATH + "/fabm/extern/ogs/fabm_multispectral_2xDetritus.yaml" + +class OGSTMYAMLGenerator: + def __init__(self, root): + self.root = root + self.root.title("OGSTM YAML Generator") + self.root.geometry("800x600") + + # Load FABM model + try: + self.model = pyfabm.Model(fabm_yaml) + except Exception as e: + messagebox.showerror("Error", f"Failed to load FABM model: {e}") + return + + self.create_widgets() + + def create_widgets(self): + # Main frame with scrollbar + main_frame = ttk.Frame(self.root) + main_frame.pack(fill=tk.BOTH, expand=True, padx=10, pady=10) + + # Canvas and scrollbar for scrollable content + canvas = tk.Canvas(main_frame) + scrollbar = ttk.Scrollbar(main_frame, orient="vertical", command=canvas.yview) + scrollable_frame = ttk.Frame(canvas) + + scrollable_frame.bind( + "", + lambda e: canvas.configure(scrollregion=canvas.bbox("all")) + ) + + canvas.create_window((0, 0), window=scrollable_frame, anchor="nw") + canvas.configure(yscrollcommand=scrollbar.set) + + # Interior Diagnostics Section + interior_label = ttk.Label(scrollable_frame, text="Interior Diagnostic Variables", + font=("Arial", 12, "bold")) + interior_label.pack(anchor="w", pady=(0, 10)) + + self.interior_vars = {} + interior_frame = ttk.Frame(scrollable_frame) + interior_frame.pack(fill="x", padx=10, pady=(0, 20)) + + # Headers + ttk.Label(interior_frame, text="Variable Name", font=("Arial", 10, "bold")).grid( + row=0, column=0, sticky="w", padx=(0, 20)) + ttk.Label(interior_frame, text="diahf", font=("Arial", 10, "bold")).grid( + row=0, column=1, padx=10) + ttk.Label(interior_frame, text="diaWR", font=("Arial", 10, "bold")).grid( + row=0, column=2, padx=10) + + row = 1 + for variable in self.model.interior_diagnostic_variables: + if variable.output: + var_name = variable.name.replace('/', '_') + + # Variable name + ttk.Label(interior_frame, text=var_name).grid( + row=row, column=0, sticky="w", padx=(0, 20), pady=2) + + # diahf checkbox + diahf_var = tk.BooleanVar() + ttk.Checkbutton(interior_frame, variable=diahf_var).grid( + row=row, column=1, padx=10, pady=2) + + # diaWR checkbox + diawr_var = tk.BooleanVar() + ttk.Checkbutton(interior_frame, variable=diawr_var).grid( + row=row, column=2, padx=10, pady=2) + + self.interior_vars[var_name] = {'diahf': diahf_var, 'diaWR': diawr_var} + row += 1 + + # Horizontal Diagnostics Section + horizontal_label = ttk.Label(scrollable_frame, text="Horizontal Diagnostic Variables", + font=("Arial", 12, "bold")) + horizontal_label.pack(anchor="w", pady=(20, 10)) + + self.horizontal_vars = {} + horizontal_frame = ttk.Frame(scrollable_frame) + horizontal_frame.pack(fill="x", padx=10, pady=(0, 20)) + + # Headers + ttk.Label(horizontal_frame, text="Variable Name", font=("Arial", 10, "bold")).grid( + row=0, column=0, sticky="w", padx=(0, 20)) + ttk.Label(horizontal_frame, text="diahf_2d", font=("Arial", 10, "bold")).grid( + row=0, column=1, padx=10) + ttk.Label(horizontal_frame, text="diaWR_2d", font=("Arial", 10, "bold")).grid( + row=0, column=2, padx=10) + + row = 1 + for variable in self.model.horizontal_diagnostic_variables: + if variable.output: + var_name = variable.name.replace('/', '_') + + # Variable name + ttk.Label(horizontal_frame, text=var_name).grid( + row=row, column=0, sticky="w", padx=(0, 20), pady=2) + + # diahf_2d checkbox + diahf_2d_var = tk.BooleanVar() + ttk.Checkbutton(horizontal_frame, variable=diahf_2d_var).grid( + row=row, column=1, padx=10, pady=2) + + # diaWR_2d checkbox + diawr_2d_var = tk.BooleanVar() + ttk.Checkbutton(horizontal_frame, variable=diawr_2d_var).grid( + row=row, column=2, padx=10, pady=2) + + self.horizontal_vars[var_name] = {'diahf_2d': diahf_2d_var, 'diaWR_2d': diawr_2d_var} + row += 1 + + # Pack canvas and scrollbar + canvas.pack(side="left", fill="both", expand=True) + scrollbar.pack(side="right", fill="y") + + # Buttons frame + button_frame = ttk.Frame(self.root) + button_frame.pack(fill="x", padx=10, pady=10) + + ttk.Button(button_frame, text="Generate YAML", + command=self.generate_yaml).pack(side="right", padx=(10, 0)) + ttk.Button(button_frame, text="Select All", + command=self.select_all).pack(side="right", padx=(10, 0)) + ttk.Button(button_frame, text="Deselect All", + command=self.deselect_all).pack(side="right") + + # Bind mousewheel to canvas + def on_mousewheel(event): + canvas.yview_scroll(int(-1*(event.delta/120)), "units") + canvas.bind_all("", on_mousewheel) + + def select_all(self): + for var_dict in self.interior_vars.values(): + var_dict['diahf'].set(True) + var_dict['diaWR'].set(True) + for var_dict in self.horizontal_vars.values(): + var_dict['diahf_2d'].set(True) + var_dict['diaWR_2d'].set(True) + + def deselect_all(self): + for var_dict in self.interior_vars.values(): + var_dict['diahf'].set(False) + var_dict['diaWR'].set(False) + for var_dict in self.horizontal_vars.values(): + var_dict['diahf_2d'].set(False) + var_dict['diaWR_2d'].set(False) + + def generate_yaml(self): + try: + with open('ogstm.yaml', 'w') as f: + # Interior state variables + f.write('interior_state:\n') + for i, variable in enumerate(self.model.state_variables): + f.write(f" {variable.name.replace('/','_')}:\n") + f.write(f" ctrmax: 1.000000e+03\n") + # OGSTM want always at least an high freq output + if i == 0: + f.write(f" ctrhf: 1\n") + else: + f.write(f" ctrhf: 0\n") + f.write(f" relax: 0\n") + + # Interior diagnostic variables - only include if diaWR is True + f.write('interior_diagnostic:\n') + interior_written = False + for var_name, var_dict in self.interior_vars.items(): + if var_dict['diaWR'].get(): # Only write if diaWR is checked + f.write(f" {var_name}:\n") + f.write(f" diahf: {1 if var_dict['diahf'].get() else 0}\n") + f.write(f" diaWR: 1\n") + interior_written = True + + # If no interior diagnostic variables were written, add a placeholder comment + if not interior_written: + f.write(' # No interior diagnostic variables selected for output\n') + + # Horizontal diagnostic variables - only include if diaWR_2d is True + f.write('horizontal_diagnostic:\n') + horizontal_written = False + for var_name, var_dict in self.horizontal_vars.items(): + if var_dict['diaWR_2d'].get(): # Only write if diaWR_2d is checked + f.write(f" {var_name}:\n") + f.write(f" diahf_2d: {1 if var_dict['diahf_2d'].get() else 0}\n") + f.write(f" diaWR_2d: 1\n") + horizontal_written = True + + # If no horizontal diagnostic variables were written, add a placeholder comment + if not horizontal_written: + f.write(' # No horizontal diagnostic variables selected for output\n') + + messagebox.showinfo("Success", "ogstm.yaml file generated successfully!") + + except Exception as e: + messagebox.showerror("Error", f"Failed to generate YAML file: {e}") + +if __name__ == "__main__": + root = tk.Tk() + app = OGSTMYAMLGenerator(root) + root.mainloop() From 2a725a340a14d070850d846ee2782cd56f98c9c3 Mon Sep 17 00:00:00 2001 From: Marco-Puglia Date: Thu, 26 Mar 2026 09:35:23 +0100 Subject: [PATCH 67/97] added a missing space in the cp yaml instruction --- testcase/deploy_code.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/testcase/deploy_code.py b/testcase/deploy_code.py index c634a4ad..f8fb725c 100644 --- a/testcase/deploy_code.py +++ b/testcase/deploy_code.py @@ -47,7 +47,7 @@ def deploy_code(test): os.system("cp -pf " + namelist_phys + test['Dir'].decode() + "/") fabm_yaml= CODEPATH + "/fabm/extern/ogs/fabm_multispectral_2xDetritus.yaml " - os.system("cp -pf " + fabm_yaml + test['Dir'].decode() + "/fabm.yaml") + os.system("cp -pf " + fabm_yaml + " " + test['Dir'].decode() + "/fabm.yaml") ret = os.system("cp -pf ogstm.yaml " + test['Dir'].decode() + "/ogstm.yaml") if ret != 0: From 513ee1476edb8650f3d827085fe0f477fba8b0cc Mon Sep 17 00:00:00 2001 From: Marco-Puglia Date: Thu, 26 Mar 2026 09:39:24 +0100 Subject: [PATCH 68/97] switched from the now absent lbfm flag to the new lbgc flag in all the namelist files --- src/namelists/namelist.init | 2 +- testcase/namelist.init.default | 2 +- testcase/namelist.init.fabm | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/namelists/namelist.init b/src/namelists/namelist.init index 5c56d3e1..c3998d9d 100644 --- a/src/namelists/namelist.init +++ b/src/namelists/namelist.init @@ -23,7 +23,7 @@ lhdf = .true., latmosph = .true., lsbc = .true., - lbfm = .true., + lbgc = .true., lzdf = .true., lsnu = .true., vsedR6 = 7.0, diff --git a/testcase/namelist.init.default b/testcase/namelist.init.default index 21a46ffb..f14345cf 100644 --- a/testcase/namelist.init.default +++ b/testcase/namelist.init.default @@ -23,7 +23,7 @@ lhdf = .true., latmosph = .true., lsbc = .false., - lbfm = .false., + lbgc = .false., lzdf = .true., lsnu = .true., ! vsedR6 = 7.0, diff --git a/testcase/namelist.init.fabm b/testcase/namelist.init.fabm index 21a46ffb..f14345cf 100644 --- a/testcase/namelist.init.fabm +++ b/testcase/namelist.init.fabm @@ -23,7 +23,7 @@ lhdf = .true., latmosph = .true., lsbc = .false., - lbfm = .false., + lbgc = .false., lzdf = .true., lsnu = .true., ! vsedR6 = 7.0, From 08997ef1a46bfb188adbedd047422b5c469730f2 Mon Sep 17 00:00:00 2001 From: Marco-Puglia Date: Thu, 26 Mar 2026 11:21:06 +0100 Subject: [PATCH 69/97] revert to previous version because the change was useless --- testcase/deploy_code.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/testcase/deploy_code.py b/testcase/deploy_code.py index f8fb725c..ea3ed54a 100644 --- a/testcase/deploy_code.py +++ b/testcase/deploy_code.py @@ -47,7 +47,7 @@ def deploy_code(test): os.system("cp -pf " + namelist_phys + test['Dir'].decode() + "/") fabm_yaml= CODEPATH + "/fabm/extern/ogs/fabm_multispectral_2xDetritus.yaml " - os.system("cp -pf " + fabm_yaml + " " + test['Dir'].decode() + "/fabm.yaml") + os.system("cp -pf " + fabm_yaml + test['Dir'].decode() + "/fabm.yaml") ret = os.system("cp -pf ogstm.yaml " + test['Dir'].decode() + "/ogstm.yaml") if ret != 0: From de7ba4c1817ce8df801679c9934d385207d0538a Mon Sep 17 00:00:00 2001 From: Marco-Puglia Date: Mon, 30 Mar 2026 10:03:28 +0200 Subject: [PATCH 70/97] changed #ifndef to #ifdef to fix the bfm 'zero matrix output' runs --- src/General/step.f90 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/General/step.f90 b/src/General/step.f90 index 7265f36e..1a926fef 100644 --- a/src/General/step.f90 +++ b/src/General/step.f90 @@ -173,7 +173,7 @@ SUBROUTINE step ! Call Passive tracer model between synchronization for small parallelisation CALL trcstp(DATEstring) ! se commento questo non fa calcoli -#ifndef key_trc_bfm +#ifdef key_trc_bfm call trcave(DATEstring) #endif From fc03e83a763d294a750b1a529dafb0becde1028e Mon Sep 17 00:00:00 2001 From: Paolo Lazzari Date: Mon, 30 Mar 2026 11:25:44 +0200 Subject: [PATCH 71/97] correct unit of measure and direction for sinking velocities, FABM provides sinking velocities already in m/s and negative --- src/BIO/trcsed_fabm.f90 | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/src/BIO/trcsed_fabm.f90 b/src/BIO/trcsed_fabm.f90 index 25cd090e..4bc9dd1a 100644 --- a/src/BIO/trcsed_fabm.f90 +++ b/src/BIO/trcsed_fabm.f90 @@ -63,7 +63,7 @@ SUBROUTINE trcsed_fabm LOGICAL :: l1,l2,l3 INTEGER :: ji,jj,jk,jv,jf,jn INTEGER :: bottom - double precision :: ze3tr,d2s + double precision :: ze3tr ! omp variables !!---------------------------------------------------------------------- @@ -71,10 +71,6 @@ SUBROUTINE trcsed_fabm !! =================== - - - d2s=1./3600./24. ! speed from (m/day) to (m/s) - IF (dimen_jvsed .EQ. 0) THEN ! initialization phase DO ji = 2,jpim1 DO jj = 2,jpjm1 @@ -128,18 +124,20 @@ SUBROUTINE trcsed_fabm END DO END DO -! 1.2 tracer flux at w-point: we use -vsed (downward flux) +! 1.2 tracer flux at w-point: we use ogstm_sedipi already in m/s from +! FABM(downward flux) ! with simplification : no e1*e2 DO jn =1,nsed DO jk = 2,jpk - zwork(jk,jn,1) = -ogstm_sedipi(jk-1,jj,ji,jn) * trn(jk-1,jj,ji,jn) + zwork(jk,jn,1) = ogstm_sedipi(jk-1,jj,ji,jn) * trn(jk-1,jj,ji,jn) END DO END DO bottom = mbathy(jj,ji) + 1 - zwork(bottom,:,1) = bottom_flux * zwork(bottom,:,1) ! bottom_flux = 0 -> no flux in the sea floor +!check! + zwork(bottom,:,1) = 0.0d0!bottom_flux * zwork(bottom,:,1) ! bottom_flux = 0 -> no flux in the sea floor ! 1.3 tracer flux divergence at t-point added to the general trend @@ -156,8 +154,7 @@ SUBROUTINE trcsed_fabm END DO DO jn =1,nsed -!!! d2s convert speed from (m/day) to (m/s) - tra(jk,jj,ji,jn) = tra(jk,jj,ji,jn) + ztra(jn,1)*d2s + tra(jk,jj,ji,jn) = tra(jk,jj,ji,jn) + ztra(jn,1) END DO #ifdef key_trc_diabio From 3b69d9bc4cb8fcb60f218c5cfc74e86b27350dd8 Mon Sep 17 00:00:00 2001 From: Paolo Lazzari Date: Tue, 7 Apr 2026 11:51:38 +0200 Subject: [PATCH 72/97] Add RosenMacartur model setup --- src/IO/domrea.f90 | 4 ++ .../INIT_NWM_KB_FABM_ROSENMCARTUR/INIT.P1_DW | 43 +++++++++++++++++++ .../INIT_NWM_KB_FABM_ROSENMCARTUR/INIT.Z1_DWz | 43 +++++++++++++++++++ .../TRASH/INIT.B1_c | 43 +++++++++++++++++++ .../TRASH/INIT.B1_n | 43 +++++++++++++++++++ .../TRASH/INIT.B1_p | 43 +++++++++++++++++++ .../TRASH/INIT.N1_p | 43 +++++++++++++++++++ .../TRASH/INIT.N3_n | 43 +++++++++++++++++++ .../TRASH/INIT.N4_n | 43 +++++++++++++++++++ .../TRASH/INIT.N5_s | 43 +++++++++++++++++++ .../TRASH/INIT.N6_r | 43 +++++++++++++++++++ .../TRASH/INIT.O2_o | 43 +++++++++++++++++++ .../TRASH/INIT.O3_c | 43 +++++++++++++++++++ .../TRASH/INIT.O3h_h | 43 +++++++++++++++++++ .../TRASH/INIT.O4_n | 43 +++++++++++++++++++ .../TRASH/INIT.O5_c | 43 +++++++++++++++++++ .../TRASH/INIT.P1_Chl | 43 +++++++++++++++++++ .../TRASH/INIT.P1_c | 43 +++++++++++++++++++ .../TRASH/INIT.P1_n | 43 +++++++++++++++++++ .../TRASH/INIT.P1_p | 43 +++++++++++++++++++ .../TRASH/INIT.P1_s | 43 +++++++++++++++++++ .../TRASH/INIT.P2_Chl | 43 +++++++++++++++++++ .../TRASH/INIT.P2_c | 43 +++++++++++++++++++ .../TRASH/INIT.P2_n | 43 +++++++++++++++++++ .../TRASH/INIT.P2_p | 43 +++++++++++++++++++ .../TRASH/INIT.P3_Chl | 43 +++++++++++++++++++ .../TRASH/INIT.P3_c | 43 +++++++++++++++++++ .../TRASH/INIT.P3_n | 43 +++++++++++++++++++ .../TRASH/INIT.P3_p | 43 +++++++++++++++++++ .../TRASH/INIT.P4_Chl | 43 +++++++++++++++++++ .../TRASH/INIT.P4_c | 43 +++++++++++++++++++ .../TRASH/INIT.P4_n | 43 +++++++++++++++++++ .../TRASH/INIT.P4_p | 43 +++++++++++++++++++ .../TRASH/INIT.R1_c | 43 +++++++++++++++++++ .../TRASH/INIT.R1_n | 43 +++++++++++++++++++ .../TRASH/INIT.R1_p | 43 +++++++++++++++++++ .../TRASH/INIT.R1_s | 43 +++++++++++++++++++ .../TRASH/INIT.R2_c | 43 +++++++++++++++++++ .../TRASH/INIT.R3_c | 43 +++++++++++++++++++ .../TRASH/INIT.R6_c | 43 +++++++++++++++++++ .../TRASH/INIT.R6_n | 43 +++++++++++++++++++ .../TRASH/INIT.R6_p | 43 +++++++++++++++++++ .../TRASH/INIT.R6_s | 43 +++++++++++++++++++ .../TRASH/INIT.R8_c | 43 +++++++++++++++++++ .../TRASH/INIT.R8_n | 43 +++++++++++++++++++ .../TRASH/INIT.R8_p | 43 +++++++++++++++++++ .../TRASH/INIT.R8_s | 43 +++++++++++++++++++ .../TRASH/INIT.X1_c | 43 +++++++++++++++++++ .../TRASH/INIT.X2_c | 43 +++++++++++++++++++ .../TRASH/INIT.X3_c | 43 +++++++++++++++++++ .../TRASH/INIT.Z3_c | 43 +++++++++++++++++++ .../TRASH/INIT.Z3_n | 43 +++++++++++++++++++ .../TRASH/INIT.Z3_p | 43 +++++++++++++++++++ .../TRASH/INIT.Z4_c | 43 +++++++++++++++++++ .../TRASH/INIT.Z4_n | 43 +++++++++++++++++++ .../TRASH/INIT.Z4_p | 43 +++++++++++++++++++ .../TRASH/INIT.Z5_c | 43 +++++++++++++++++++ .../TRASH/INIT.Z5_n | 43 +++++++++++++++++++ .../TRASH/INIT.Z5_p | 43 +++++++++++++++++++ .../TRASH/INIT.Z6_c | 43 +++++++++++++++++++ .../TRASH/INIT.Z6_n | 43 +++++++++++++++++++ .../TRASH/INIT.Z6_p | 43 +++++++++++++++++++ .../TRASH/INIT.depth | 43 +++++++++++++++++++ testcase/fabm_rosenmcartur.yaml | 26 +++++++++++ 64 files changed, 2696 insertions(+) create mode 100644 testcase/KB/INIT_NWM_KB_FABM_ROSENMCARTUR/INIT.P1_DW create mode 100644 testcase/KB/INIT_NWM_KB_FABM_ROSENMCARTUR/INIT.Z1_DWz create mode 100644 testcase/KB/INIT_NWM_KB_FABM_ROSENMCARTUR/TRASH/INIT.B1_c create mode 100644 testcase/KB/INIT_NWM_KB_FABM_ROSENMCARTUR/TRASH/INIT.B1_n create mode 100644 testcase/KB/INIT_NWM_KB_FABM_ROSENMCARTUR/TRASH/INIT.B1_p create mode 100644 testcase/KB/INIT_NWM_KB_FABM_ROSENMCARTUR/TRASH/INIT.N1_p create mode 100644 testcase/KB/INIT_NWM_KB_FABM_ROSENMCARTUR/TRASH/INIT.N3_n create mode 100644 testcase/KB/INIT_NWM_KB_FABM_ROSENMCARTUR/TRASH/INIT.N4_n create mode 100644 testcase/KB/INIT_NWM_KB_FABM_ROSENMCARTUR/TRASH/INIT.N5_s create mode 100644 testcase/KB/INIT_NWM_KB_FABM_ROSENMCARTUR/TRASH/INIT.N6_r create mode 100644 testcase/KB/INIT_NWM_KB_FABM_ROSENMCARTUR/TRASH/INIT.O2_o create mode 100644 testcase/KB/INIT_NWM_KB_FABM_ROSENMCARTUR/TRASH/INIT.O3_c create mode 100644 testcase/KB/INIT_NWM_KB_FABM_ROSENMCARTUR/TRASH/INIT.O3h_h create mode 100644 testcase/KB/INIT_NWM_KB_FABM_ROSENMCARTUR/TRASH/INIT.O4_n create mode 100644 testcase/KB/INIT_NWM_KB_FABM_ROSENMCARTUR/TRASH/INIT.O5_c create mode 100644 testcase/KB/INIT_NWM_KB_FABM_ROSENMCARTUR/TRASH/INIT.P1_Chl create mode 100644 testcase/KB/INIT_NWM_KB_FABM_ROSENMCARTUR/TRASH/INIT.P1_c create mode 100644 testcase/KB/INIT_NWM_KB_FABM_ROSENMCARTUR/TRASH/INIT.P1_n create mode 100644 testcase/KB/INIT_NWM_KB_FABM_ROSENMCARTUR/TRASH/INIT.P1_p create mode 100644 testcase/KB/INIT_NWM_KB_FABM_ROSENMCARTUR/TRASH/INIT.P1_s create mode 100644 testcase/KB/INIT_NWM_KB_FABM_ROSENMCARTUR/TRASH/INIT.P2_Chl create mode 100644 testcase/KB/INIT_NWM_KB_FABM_ROSENMCARTUR/TRASH/INIT.P2_c create mode 100644 testcase/KB/INIT_NWM_KB_FABM_ROSENMCARTUR/TRASH/INIT.P2_n create mode 100644 testcase/KB/INIT_NWM_KB_FABM_ROSENMCARTUR/TRASH/INIT.P2_p create mode 100644 testcase/KB/INIT_NWM_KB_FABM_ROSENMCARTUR/TRASH/INIT.P3_Chl create mode 100644 testcase/KB/INIT_NWM_KB_FABM_ROSENMCARTUR/TRASH/INIT.P3_c create mode 100644 testcase/KB/INIT_NWM_KB_FABM_ROSENMCARTUR/TRASH/INIT.P3_n create mode 100644 testcase/KB/INIT_NWM_KB_FABM_ROSENMCARTUR/TRASH/INIT.P3_p create mode 100644 testcase/KB/INIT_NWM_KB_FABM_ROSENMCARTUR/TRASH/INIT.P4_Chl create mode 100644 testcase/KB/INIT_NWM_KB_FABM_ROSENMCARTUR/TRASH/INIT.P4_c create mode 100644 testcase/KB/INIT_NWM_KB_FABM_ROSENMCARTUR/TRASH/INIT.P4_n create mode 100644 testcase/KB/INIT_NWM_KB_FABM_ROSENMCARTUR/TRASH/INIT.P4_p create mode 100644 testcase/KB/INIT_NWM_KB_FABM_ROSENMCARTUR/TRASH/INIT.R1_c create mode 100644 testcase/KB/INIT_NWM_KB_FABM_ROSENMCARTUR/TRASH/INIT.R1_n create mode 100644 testcase/KB/INIT_NWM_KB_FABM_ROSENMCARTUR/TRASH/INIT.R1_p create mode 100644 testcase/KB/INIT_NWM_KB_FABM_ROSENMCARTUR/TRASH/INIT.R1_s create mode 100644 testcase/KB/INIT_NWM_KB_FABM_ROSENMCARTUR/TRASH/INIT.R2_c create mode 100644 testcase/KB/INIT_NWM_KB_FABM_ROSENMCARTUR/TRASH/INIT.R3_c create mode 100644 testcase/KB/INIT_NWM_KB_FABM_ROSENMCARTUR/TRASH/INIT.R6_c create mode 100644 testcase/KB/INIT_NWM_KB_FABM_ROSENMCARTUR/TRASH/INIT.R6_n create mode 100644 testcase/KB/INIT_NWM_KB_FABM_ROSENMCARTUR/TRASH/INIT.R6_p create mode 100644 testcase/KB/INIT_NWM_KB_FABM_ROSENMCARTUR/TRASH/INIT.R6_s create mode 100644 testcase/KB/INIT_NWM_KB_FABM_ROSENMCARTUR/TRASH/INIT.R8_c create mode 100644 testcase/KB/INIT_NWM_KB_FABM_ROSENMCARTUR/TRASH/INIT.R8_n create mode 100644 testcase/KB/INIT_NWM_KB_FABM_ROSENMCARTUR/TRASH/INIT.R8_p create mode 100644 testcase/KB/INIT_NWM_KB_FABM_ROSENMCARTUR/TRASH/INIT.R8_s create mode 100644 testcase/KB/INIT_NWM_KB_FABM_ROSENMCARTUR/TRASH/INIT.X1_c create mode 100644 testcase/KB/INIT_NWM_KB_FABM_ROSENMCARTUR/TRASH/INIT.X2_c create mode 100644 testcase/KB/INIT_NWM_KB_FABM_ROSENMCARTUR/TRASH/INIT.X3_c create mode 100644 testcase/KB/INIT_NWM_KB_FABM_ROSENMCARTUR/TRASH/INIT.Z3_c create mode 100644 testcase/KB/INIT_NWM_KB_FABM_ROSENMCARTUR/TRASH/INIT.Z3_n create mode 100644 testcase/KB/INIT_NWM_KB_FABM_ROSENMCARTUR/TRASH/INIT.Z3_p create mode 100644 testcase/KB/INIT_NWM_KB_FABM_ROSENMCARTUR/TRASH/INIT.Z4_c create mode 100644 testcase/KB/INIT_NWM_KB_FABM_ROSENMCARTUR/TRASH/INIT.Z4_n create mode 100644 testcase/KB/INIT_NWM_KB_FABM_ROSENMCARTUR/TRASH/INIT.Z4_p create mode 100644 testcase/KB/INIT_NWM_KB_FABM_ROSENMCARTUR/TRASH/INIT.Z5_c create mode 100644 testcase/KB/INIT_NWM_KB_FABM_ROSENMCARTUR/TRASH/INIT.Z5_n create mode 100644 testcase/KB/INIT_NWM_KB_FABM_ROSENMCARTUR/TRASH/INIT.Z5_p create mode 100644 testcase/KB/INIT_NWM_KB_FABM_ROSENMCARTUR/TRASH/INIT.Z6_c create mode 100644 testcase/KB/INIT_NWM_KB_FABM_ROSENMCARTUR/TRASH/INIT.Z6_n create mode 100644 testcase/KB/INIT_NWM_KB_FABM_ROSENMCARTUR/TRASH/INIT.Z6_p create mode 100644 testcase/KB/INIT_NWM_KB_FABM_ROSENMCARTUR/TRASH/INIT.depth create mode 100644 testcase/fabm_rosenmcartur.yaml diff --git a/src/IO/domrea.f90 b/src/IO/domrea.f90 index 3130ac8b..2b08be42 100644 --- a/src/IO/domrea.f90 +++ b/src/IO/domrea.f90 @@ -207,6 +207,10 @@ SUBROUTINE domrea var_nc(5) = 'O3c' var_nc(6) = 'O3h' #elif key_trc_fabm +!!! For RosenMacartur decomment the two below lines and comment the other 6 lines +! var_nc(1) = 'P1_DW' +! var_nc(2) = 'Z1_DWz' +!!! For BFM decomment the 6 lines below and comment the two above lines var_nc(1) = 'O2_o' var_nc(2) = 'N1_p' var_nc(3) = 'N3_n' diff --git a/testcase/KB/INIT_NWM_KB_FABM_ROSENMCARTUR/INIT.P1_DW b/testcase/KB/INIT_NWM_KB_FABM_ROSENMCARTUR/INIT.P1_DW new file mode 100644 index 00000000..9ca4c7d3 --- /dev/null +++ b/testcase/KB/INIT_NWM_KB_FABM_ROSENMCARTUR/INIT.P1_DW @@ -0,0 +1,43 @@ +1.00000000000000000000 +1.00000000000000000000 +1.00000000000000000000 +1.00000000000000000000 +1.00000000000000000000 +1.00000000000000000000 +1.00000000000000000000 +1.00000000000000000000 +1.00000000000000000000 +1.00000000000000000000 +1.00000000000000000000 +1.00000000000000000000 +1.00000000000000000000 +1.00000000000000000000 +1.00000000000000000000 +1.00000000000000000000 +1.00000000000000000000 +1.00000000000000000000 +1.00000000000000000000 +1.00000000000000000000 +1.00000000000000000000 +1.00000000000000000000 +1.00000000000000000000 +1.00000000000000000000 +1.00000000000000000000 +1.00000000000000000000 +1.00000000000000000000 +1.00000000000000000000 +1.00000000000000000000 +1.00000000000000000000 +1.00000000000000000000 +1.00000000000000000000 +1.00000000000000000000 +1.00000000000000000000 +1.00000000000000000000 +1.00000000000000000000 +1.00000000000000000000 +1.00000000000000000000 +1.00000000000000000000 +1.00000000000000000000 +1.00000000000000000000 +1.00000000000000000000 +1.00000000000000000000 diff --git a/testcase/KB/INIT_NWM_KB_FABM_ROSENMCARTUR/INIT.Z1_DWz b/testcase/KB/INIT_NWM_KB_FABM_ROSENMCARTUR/INIT.Z1_DWz new file mode 100644 index 00000000..b1e2319e --- /dev/null +++ b/testcase/KB/INIT_NWM_KB_FABM_ROSENMCARTUR/INIT.Z1_DWz @@ -0,0 +1,43 @@ +0.10000000000000000000 +0.10000000000000000000 +0.10000000000000000000 +0.10000000000000000000 +0.10000000000000000000 +0.10000000000000000000 +0.10000000000000000000 +0.10000000000000000000 +0.10000000000000000000 +0.10000000000000000000 +0.10000000000000000000 +0.10000000000000000000 +0.10000000000000000000 +0.10000000000000000000 +0.10000000000000000000 +0.10000000000000000000 +0.10000000000000000000 +0.10000000000000000000 +0.10000000000000000000 +0.10000000000000000000 +0.10000000000000000000 +0.10000000000000000000 +0.10000000000000000000 +0.10000000000000000000 +0.10000000000000000000 +0.10000000000000000000 +0.10000000000000000000 +0.10000000000000000000 +0.10000000000000000000 +0.10000000000000000000 +0.10000000000000000000 +0.10000000000000000000 +0.10000000000000000000 +0.10000000000000000000 +0.10000000000000000000 +0.10000000000000000000 +0.10000000000000000000 +0.10000000000000000000 +0.10000000000000000000 +0.10000000000000000000 +0.10000000000000000000 +0.10000000000000000000 +0.10000000000000000000 diff --git a/testcase/KB/INIT_NWM_KB_FABM_ROSENMCARTUR/TRASH/INIT.B1_c b/testcase/KB/INIT_NWM_KB_FABM_ROSENMCARTUR/TRASH/INIT.B1_c new file mode 100644 index 00000000..b938c94d --- /dev/null +++ b/testcase/KB/INIT_NWM_KB_FABM_ROSENMCARTUR/TRASH/INIT.B1_c @@ -0,0 +1,43 @@ +8.00000000000000000000 +8.00000000000000000000 +8.00000000000000000000 +8.00000000000000000000 +8.00000000000000000000 +8.00000000000000000000 +8.00000000000000000000 +8.00000000000000000000 +8.00000000000000000000 +8.00000000000000000000 +8.00000000000000000000 +8.00000000000000000000 +8.00000000000000000000 +0.00000000080000000000 +0.00000000080000000000 +0.00000000080000000000 +0.00000000080000000000 +0.00000000080000000000 +0.00000000080000000000 +0.00000000080000000000 +0.00000000080000000000 +0.00000000080000000000 +0.00000000080000000000 +0.00000000080000000000 +0.00000000080000000000 +0.00000000080000000000 +0.00000000080000000000 +0.00000000080000000000 +0.00000000080000000000 +0.00000000080000000000 +0.00000000080000000000 +0.00000000080000000000 +0.00000000080000000000 +0.00000000080000000000 +0.00000000080000000000 +0.00000000080000000000 +0.00000000080000000000 +0.00000000080000000000 +0.00000000080000000000 +0.00000000080000000000 +0.00000000080000000000 +0.00000000080000000000 +0.00000000080000000000 diff --git a/testcase/KB/INIT_NWM_KB_FABM_ROSENMCARTUR/TRASH/INIT.B1_n b/testcase/KB/INIT_NWM_KB_FABM_ROSENMCARTUR/TRASH/INIT.B1_n new file mode 100644 index 00000000..f767ff59 --- /dev/null +++ b/testcase/KB/INIT_NWM_KB_FABM_ROSENMCARTUR/TRASH/INIT.B1_n @@ -0,0 +1,43 @@ +0.06800000000000000000 +0.06800000000000000000 +0.06800000000000000000 +0.06800000000000000000 +0.06800000000000000000 +0.06800000000000000000 +0.06800000000000000000 +0.06800000000000000000 +0.06800000000000000000 +0.06800000000000000000 +0.06800000000000000000 +0.06800000000000000000 +0.06800000000000000000 +0.00000000000680000000 +0.00000000000680000000 +0.00000000000680000000 +0.00000000000680000000 +0.00000000000680000000 +0.00000000000680000000 +0.00000000000680000000 +0.00000000000680000000 +0.00000000000680000000 +0.00000000000680000000 +0.00000000000680000000 +0.00000000000680000000 +0.00000000000680000000 +0.00000000000680000000 +0.00000000000680000000 +0.00000000000680000000 +0.00000000000680000000 +0.00000000000680000000 +0.00000000000680000000 +0.00000000000680000000 +0.00000000000680000000 +0.00000000000680000000 +0.00000000000680000000 +0.00000000000680000000 +0.00000000000680000000 +0.00000000000680000000 +0.00000000000680000000 +0.00000000000680000000 +0.00000000000680000000 +0.00000000000680000000 diff --git a/testcase/KB/INIT_NWM_KB_FABM_ROSENMCARTUR/TRASH/INIT.B1_p b/testcase/KB/INIT_NWM_KB_FABM_ROSENMCARTUR/TRASH/INIT.B1_p new file mode 100644 index 00000000..5477561f --- /dev/null +++ b/testcase/KB/INIT_NWM_KB_FABM_ROSENMCARTUR/TRASH/INIT.B1_p @@ -0,0 +1,43 @@ +0.00760000000000000000 +0.00760000000000000000 +0.00760000000000000000 +0.00760000000000000000 +0.00760000000000000000 +0.00760000000000000000 +0.00760000000000000000 +0.00760000000000000000 +0.00760000000000000000 +0.00760000000000000000 +0.00760000000000000000 +0.00760000000000000000 +0.00760000000000000000 +0.00000000000076000000 +0.00000000000076000000 +0.00000000000076000000 +0.00000000000076000000 +0.00000000000076000000 +0.00000000000076000000 +0.00000000000076000000 +0.00000000000076000000 +0.00000000000076000000 +0.00000000000076000000 +0.00000000000076000000 +0.00000000000076000000 +0.00000000000076000000 +0.00000000000076000000 +0.00000000000076000000 +0.00000000000076000000 +0.00000000000076000000 +0.00000000000076000000 +0.00000000000076000000 +0.00000000000076000000 +0.00000000000076000000 +0.00000000000076000000 +0.00000000000076000000 +0.00000000000076000000 +0.00000000000076000000 +0.00000000000076000000 +0.00000000000076000000 +0.00000000000076000000 +0.00000000000076000000 +0.00000000000076000000 diff --git a/testcase/KB/INIT_NWM_KB_FABM_ROSENMCARTUR/TRASH/INIT.N1_p b/testcase/KB/INIT_NWM_KB_FABM_ROSENMCARTUR/TRASH/INIT.N1_p new file mode 100644 index 00000000..5d81fb9b --- /dev/null +++ b/testcase/KB/INIT_NWM_KB_FABM_ROSENMCARTUR/TRASH/INIT.N1_p @@ -0,0 +1,43 @@ +0.16523400000000000000 +0.16523400000000000000 +0.15462200000000000000 +0.13322500000000000000 +0.12346000000000000000 +0.12719600000000000000 +0.14211400000000000000 +0.16772700000000000000 +0.19223900000000000000 +0.22108400000000000000 +0.25492200000000000000 +0.29000300000000000000 +0.32170100000000000000 +0.34633600000000000000 +0.36539000000000000000 +0.37916800000000000000 +0.38161300000000000000 +0.38704300000000000000 +0.39478200000000000000 +0.40147600000000000000 +0.40243800000000000000 +0.40350200000000000000 +0.41747600000000000000 +0.43347400000000000000 +0.43380600000000000000 +0.42563500000000000000 +0.42364400000000000000 +0.42785100000000000000 +0.42984100000000000000 +0.42951700000000000000 +0.42441200000000000000 +0.41613200000000000000 +0.40767300000000000000 +0.40040500000000000000 +0.40341000000000000000 +0.40502200000000000000 +0.40502200000000000000 +0.40502200000000000000 +0.40502200000000000000 +0.40502200000000000000 +0.40502200000000000000 +0.40502200000000000000 +0.40502200000000000000 diff --git a/testcase/KB/INIT_NWM_KB_FABM_ROSENMCARTUR/TRASH/INIT.N3_n b/testcase/KB/INIT_NWM_KB_FABM_ROSENMCARTUR/TRASH/INIT.N3_n new file mode 100644 index 00000000..c39b16a5 --- /dev/null +++ b/testcase/KB/INIT_NWM_KB_FABM_ROSENMCARTUR/TRASH/INIT.N3_n @@ -0,0 +1,43 @@ +0.32068100000000000000 +0.32068100000000000000 +0.73760500000000000000 +1.34809800000000000000 +2.00095100000000000000 +2.70580200000000000000 +3.80775400000000000000 +5.22682700000000000000 +6.12715700000000000000 +6.51180400000000000000 +6.76125900000000000000 +7.05128800000000000000 +7.35078000000000000000 +7.64837600000000000000 +8.04166600000000000000 +8.22991500000000000000 +7.99070900000000000000 +7.91138400000000000000 +8.00636400000000000000 +8.09380100000000000000 +8.12630200000000000000 +8.16224600000000000000 +8.28216100000000000000 +8.41771900000000000000 +8.41925400000000000000 +8.34799800000000000000 +8.24645100000000000000 +8.11482700000000000000 +8.03975700000000000000 +8.02381400000000000000 +7.99218000000000000000 +7.94996800000000000000 +7.53459200000000000000 +7.09168700000000000000 +7.09168700000000000000 +7.09168700000000000000 +7.09168700000000000000 +7.09168700000000000000 +7.09168700000000000000 +7.09168700000000000000 +7.09168700000000000000 +7.09168700000000000000 +7.09168700000000000000 diff --git a/testcase/KB/INIT_NWM_KB_FABM_ROSENMCARTUR/TRASH/INIT.N4_n b/testcase/KB/INIT_NWM_KB_FABM_ROSENMCARTUR/TRASH/INIT.N4_n new file mode 100644 index 00000000..e97c5017 --- /dev/null +++ b/testcase/KB/INIT_NWM_KB_FABM_ROSENMCARTUR/TRASH/INIT.N4_n @@ -0,0 +1,43 @@ +0.01000000000000000000 +0.01000000000000000000 +0.01000000000000000000 +0.01000000000000000000 +0.01000000000000000000 +0.01000000000000000000 +0.01000000000000000000 +0.01000000000000000000 +0.01000000000000000000 +0.01000000000000000000 +0.01000000000000000000 +0.01000000000000000000 +0.01000000000000000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 diff --git a/testcase/KB/INIT_NWM_KB_FABM_ROSENMCARTUR/TRASH/INIT.N5_s b/testcase/KB/INIT_NWM_KB_FABM_ROSENMCARTUR/TRASH/INIT.N5_s new file mode 100644 index 00000000..46283422 --- /dev/null +++ b/testcase/KB/INIT_NWM_KB_FABM_ROSENMCARTUR/TRASH/INIT.N5_s @@ -0,0 +1,43 @@ +1.69844400000000000000 +1.69844400000000000000 +1.49924400000000000000 +1.45740100000000000000 +1.54467400000000000000 +1.78258600000000000000 +2.06839600000000000000 +2.39814100000000000000 +2.78805600000000000000 +3.19409000000000000000 +3.63097100000000000000 +4.08502600000000000000 +4.60952500000000000000 +5.20964400000000000000 +5.38309400000000000000 +5.71064300000000000000 +6.33691000000000000000 +6.75696000000000000000 +6.90878300000000000000 +7.12213000000000000000 +7.46151900000000000000 +7.83687100000000000000 +7.84077300000000000000 +7.82128400000000000000 +7.86414700000000000000 +7.94237300000000000000 +8.08236500000000000000 +8.28387400000000000000 +8.25326900000000000000 +7.98183100000000000000 +7.76668300000000000000 +7.58593400000000000000 +8.13348500000000000000 +8.76179200000000000000 +8.76179200000000000000 +8.76179200000000000000 +8.76179200000000000000 +8.76179200000000000000 +8.76179200000000000000 +8.76179200000000000000 +8.76179200000000000000 +8.76179200000000000000 +8.76179200000000000000 diff --git a/testcase/KB/INIT_NWM_KB_FABM_ROSENMCARTUR/TRASH/INIT.N6_r b/testcase/KB/INIT_NWM_KB_FABM_ROSENMCARTUR/TRASH/INIT.N6_r new file mode 100644 index 00000000..051c41cc --- /dev/null +++ b/testcase/KB/INIT_NWM_KB_FABM_ROSENMCARTUR/TRASH/INIT.N6_r @@ -0,0 +1,43 @@ +1.00000000000000000000 +1.00000000000000000000 +1.00000000000000000000 +1.00000000000000000000 +1.00000000000000000000 +1.00000000000000000000 +1.00000000000000000000 +1.00000000000000000000 +1.00000000000000000000 +1.00000000000000000000 +1.00000000000000000000 +1.00000000000000000000 +1.00000000000000000000 +0.00000000010000000000 +0.00000000010000000000 +0.00000000010000000000 +0.00000000010000000000 +0.00000000010000000000 +0.00000000010000000000 +0.00000000010000000000 +0.00000000010000000000 +0.00000000010000000000 +0.00000000010000000000 +0.00000000010000000000 +0.00000000010000000000 +0.00000000010000000000 +0.00000000010000000000 +0.00000000010000000000 +0.00000000010000000000 +0.00000000010000000000 +0.00000000010000000000 +0.00000000010000000000 +0.00000000010000000000 +0.00000000010000000000 +0.00000000010000000000 +0.00000000010000000000 +0.00000000010000000000 +0.00000000010000000000 +0.00000000010000000000 +0.00000000010000000000 +0.00000000010000000000 +0.00000000010000000000 +0.00000000010000000000 diff --git a/testcase/KB/INIT_NWM_KB_FABM_ROSENMCARTUR/TRASH/INIT.O2_o b/testcase/KB/INIT_NWM_KB_FABM_ROSENMCARTUR/TRASH/INIT.O2_o new file mode 100644 index 00000000..f9c93e6d --- /dev/null +++ b/testcase/KB/INIT_NWM_KB_FABM_ROSENMCARTUR/TRASH/INIT.O2_o @@ -0,0 +1,43 @@ +240.00020500000000000000 +240.00020500000000000000 +241.07563500000000000000 +245.34695400000000000000 +246.39085500000000000000 +243.68261900000000000000 +239.27435200000000000000 +233.48347300000000000000 +227.81100100000000000000 +224.31329000000000000000 +221.18463300000000000000 +215.81968600000000000000 +209.63923900000000000000 +203.03697800000000000000 +198.63600800000000000000 +194.73255500000000000000 +192.04497600000000000000 +190.79438400000000000000 +191.18387200000000000000 +191.26327500000000000000 +190.30606900000000000000 +189.24743700000000000000 +190.86546000000000000000 +192.79315700000000000000 +196.08439400000000000000 +200.22998400000000000000 +202.80832500000000000000 +203.80896300000000000000 +205.28080600000000000000 +207.23390300000000000000 +207.98633200000000000000 +207.96360000000000000000 +207.01531400000000000000 +205.91890300000000000000 +205.31800200000000000000 +204.99563000000000000000 +204.99563000000000000000 +204.99563000000000000000 +204.99563000000000000000 +204.99563000000000000000 +204.99563000000000000000 +204.99563000000000000000 +204.99563000000000000000 diff --git a/testcase/KB/INIT_NWM_KB_FABM_ROSENMCARTUR/TRASH/INIT.O3_c b/testcase/KB/INIT_NWM_KB_FABM_ROSENMCARTUR/TRASH/INIT.O3_c new file mode 100644 index 00000000..bd35e7d7 --- /dev/null +++ b/testcase/KB/INIT_NWM_KB_FABM_ROSENMCARTUR/TRASH/INIT.O3_c @@ -0,0 +1,43 @@ +2.66E+04 +2.66E+04 +2.66E+04 +2.67E+04 +2.67E+04 +2.68E+04 +2.71E+04 +2.73E+04 +2.75E+04 +2.78E+04 +2.80E+04 +2.83E+04 +2.85E+04 +2.86E+04 +2.86E+04 +2.87E+04 +2.87E+04 +2.87E+04 +2.87E+04 +2.87E+04 +2.87E+04 +2.87E+04 +2.87E+04 +2.86E+04 +2.87E+04 +2.88E+04 +2.88E+04 +2.88E+04 +2.88E+04 +2.88E+04 +2.88E+04 +2.88E+04 +2.88E+04 +2.88E+04 +2.87E+04 +2.88E+04 +2.89E+04 +2.89E+04 +2.89E+04 +2.89E+04 +2.89E+04 +2.89E+04 +2.89E+04 diff --git a/testcase/KB/INIT_NWM_KB_FABM_ROSENMCARTUR/TRASH/INIT.O3h_h b/testcase/KB/INIT_NWM_KB_FABM_ROSENMCARTUR/TRASH/INIT.O3h_h new file mode 100644 index 00000000..2266dbc7 --- /dev/null +++ b/testcase/KB/INIT_NWM_KB_FABM_ROSENMCARTUR/TRASH/INIT.O3h_h @@ -0,0 +1,43 @@ +2.55E+03 +2.55E+03 +2.55E+03 +2.55E+03 +2.55E+03 +2.55E+03 +2.56E+03 +2.57E+03 +2.58E+03 +2.60E+03 +2.62E+03 +2.64E+03 +2.65E+03 +2.66E+03 +2.67E+03 +2.67E+03 +2.67E+03 +2.67E+03 +2.67E+03 +2.67E+03 +2.67E+03 +2.67E+03 +2.67E+03 +2.67E+03 +2.67E+03 +2.67E+03 +2.67E+03 +2.67E+03 +2.67E+03 +2.67E+03 +2.68E+03 +2.68E+03 +2.68E+03 +2.68E+03 +2.68E+03 +2.68E+03 +2.68E+03 +2.68E+03 +2.68E+03 +2.68E+03 +2.68E+03 +2.68E+03 +2.68E+03 diff --git a/testcase/KB/INIT_NWM_KB_FABM_ROSENMCARTUR/TRASH/INIT.O4_n b/testcase/KB/INIT_NWM_KB_FABM_ROSENMCARTUR/TRASH/INIT.O4_n new file mode 100644 index 00000000..9ca4c7d3 --- /dev/null +++ b/testcase/KB/INIT_NWM_KB_FABM_ROSENMCARTUR/TRASH/INIT.O4_n @@ -0,0 +1,43 @@ +1.00000000000000000000 +1.00000000000000000000 +1.00000000000000000000 +1.00000000000000000000 +1.00000000000000000000 +1.00000000000000000000 +1.00000000000000000000 +1.00000000000000000000 +1.00000000000000000000 +1.00000000000000000000 +1.00000000000000000000 +1.00000000000000000000 +1.00000000000000000000 +1.00000000000000000000 +1.00000000000000000000 +1.00000000000000000000 +1.00000000000000000000 +1.00000000000000000000 +1.00000000000000000000 +1.00000000000000000000 +1.00000000000000000000 +1.00000000000000000000 +1.00000000000000000000 +1.00000000000000000000 +1.00000000000000000000 +1.00000000000000000000 +1.00000000000000000000 +1.00000000000000000000 +1.00000000000000000000 +1.00000000000000000000 +1.00000000000000000000 +1.00000000000000000000 +1.00000000000000000000 +1.00000000000000000000 +1.00000000000000000000 +1.00000000000000000000 +1.00000000000000000000 +1.00000000000000000000 +1.00000000000000000000 +1.00000000000000000000 +1.00000000000000000000 +1.00000000000000000000 +1.00000000000000000000 diff --git a/testcase/KB/INIT_NWM_KB_FABM_ROSENMCARTUR/TRASH/INIT.O5_c b/testcase/KB/INIT_NWM_KB_FABM_ROSENMCARTUR/TRASH/INIT.O5_c new file mode 100644 index 00000000..16c4ec30 --- /dev/null +++ b/testcase/KB/INIT_NWM_KB_FABM_ROSENMCARTUR/TRASH/INIT.O5_c @@ -0,0 +1,43 @@ +0.00010000000000000000 +0.00010000000000000000 +0.00010000000000000000 +0.00010000000000000000 +0.00010000000000000000 +0.00010000000000000000 +0.00010000000000000000 +0.00010000000000000000 +0.00010000000000000000 +0.00010000000000000000 +0.00010000000000000000 +0.00010000000000000000 +0.00010000000000000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 diff --git a/testcase/KB/INIT_NWM_KB_FABM_ROSENMCARTUR/TRASH/INIT.P1_Chl b/testcase/KB/INIT_NWM_KB_FABM_ROSENMCARTUR/TRASH/INIT.P1_Chl new file mode 100644 index 00000000..d4d178f3 --- /dev/null +++ b/testcase/KB/INIT_NWM_KB_FABM_ROSENMCARTUR/TRASH/INIT.P1_Chl @@ -0,0 +1,43 @@ +0.10000000000000000000 +0.10000000000000000000 +0.10000000000000000000 +0.10000000000000000000 +0.10000000000000000000 +0.10000000000000000000 +0.10000000000000000000 +0.10000000000000000000 +0.10000000000000000000 +0.10000000000000000000 +0.10000000000000000000 +0.10000000000000000000 +0.10000000000000000000 +0.00000000001000000000 +0.00000000001000000000 +0.00000000001000000000 +0.00000000001000000000 +0.00000000001000000000 +0.00000000001000000000 +0.00000000001000000000 +0.00000000001000000000 +0.00000000001000000000 +0.00000000001000000000 +0.00000000001000000000 +0.00000000001000000000 +0.00000000001000000000 +0.00000000001000000000 +0.00000000001000000000 +0.00000000001000000000 +0.00000000001000000000 +0.00000000001000000000 +0.00000000001000000000 +0.00000000001000000000 +0.00000000001000000000 +0.00000000001000000000 +0.00000000001000000000 +0.00000000001000000000 +0.00000000001000000000 +0.00000000001000000000 +0.00000000001000000000 +0.00000000001000000000 +0.00000000001000000000 +0.00000000001000000000 diff --git a/testcase/KB/INIT_NWM_KB_FABM_ROSENMCARTUR/TRASH/INIT.P1_c b/testcase/KB/INIT_NWM_KB_FABM_ROSENMCARTUR/TRASH/INIT.P1_c new file mode 100644 index 00000000..b938c94d --- /dev/null +++ b/testcase/KB/INIT_NWM_KB_FABM_ROSENMCARTUR/TRASH/INIT.P1_c @@ -0,0 +1,43 @@ +8.00000000000000000000 +8.00000000000000000000 +8.00000000000000000000 +8.00000000000000000000 +8.00000000000000000000 +8.00000000000000000000 +8.00000000000000000000 +8.00000000000000000000 +8.00000000000000000000 +8.00000000000000000000 +8.00000000000000000000 +8.00000000000000000000 +8.00000000000000000000 +0.00000000080000000000 +0.00000000080000000000 +0.00000000080000000000 +0.00000000080000000000 +0.00000000080000000000 +0.00000000080000000000 +0.00000000080000000000 +0.00000000080000000000 +0.00000000080000000000 +0.00000000080000000000 +0.00000000080000000000 +0.00000000080000000000 +0.00000000080000000000 +0.00000000080000000000 +0.00000000080000000000 +0.00000000080000000000 +0.00000000080000000000 +0.00000000080000000000 +0.00000000080000000000 +0.00000000080000000000 +0.00000000080000000000 +0.00000000080000000000 +0.00000000080000000000 +0.00000000080000000000 +0.00000000080000000000 +0.00000000080000000000 +0.00000000080000000000 +0.00000000080000000000 +0.00000000080000000000 +0.00000000080000000000 diff --git a/testcase/KB/INIT_NWM_KB_FABM_ROSENMCARTUR/TRASH/INIT.P1_n b/testcase/KB/INIT_NWM_KB_FABM_ROSENMCARTUR/TRASH/INIT.P1_n new file mode 100644 index 00000000..e97c5017 --- /dev/null +++ b/testcase/KB/INIT_NWM_KB_FABM_ROSENMCARTUR/TRASH/INIT.P1_n @@ -0,0 +1,43 @@ +0.01000000000000000000 +0.01000000000000000000 +0.01000000000000000000 +0.01000000000000000000 +0.01000000000000000000 +0.01000000000000000000 +0.01000000000000000000 +0.01000000000000000000 +0.01000000000000000000 +0.01000000000000000000 +0.01000000000000000000 +0.01000000000000000000 +0.01000000000000000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 diff --git a/testcase/KB/INIT_NWM_KB_FABM_ROSENMCARTUR/TRASH/INIT.P1_p b/testcase/KB/INIT_NWM_KB_FABM_ROSENMCARTUR/TRASH/INIT.P1_p new file mode 100644 index 00000000..16c4ec30 --- /dev/null +++ b/testcase/KB/INIT_NWM_KB_FABM_ROSENMCARTUR/TRASH/INIT.P1_p @@ -0,0 +1,43 @@ +0.00010000000000000000 +0.00010000000000000000 +0.00010000000000000000 +0.00010000000000000000 +0.00010000000000000000 +0.00010000000000000000 +0.00010000000000000000 +0.00010000000000000000 +0.00010000000000000000 +0.00010000000000000000 +0.00010000000000000000 +0.00010000000000000000 +0.00010000000000000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 diff --git a/testcase/KB/INIT_NWM_KB_FABM_ROSENMCARTUR/TRASH/INIT.P1_s b/testcase/KB/INIT_NWM_KB_FABM_ROSENMCARTUR/TRASH/INIT.P1_s new file mode 100644 index 00000000..e97c5017 --- /dev/null +++ b/testcase/KB/INIT_NWM_KB_FABM_ROSENMCARTUR/TRASH/INIT.P1_s @@ -0,0 +1,43 @@ +0.01000000000000000000 +0.01000000000000000000 +0.01000000000000000000 +0.01000000000000000000 +0.01000000000000000000 +0.01000000000000000000 +0.01000000000000000000 +0.01000000000000000000 +0.01000000000000000000 +0.01000000000000000000 +0.01000000000000000000 +0.01000000000000000000 +0.01000000000000000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 diff --git a/testcase/KB/INIT_NWM_KB_FABM_ROSENMCARTUR/TRASH/INIT.P2_Chl b/testcase/KB/INIT_NWM_KB_FABM_ROSENMCARTUR/TRASH/INIT.P2_Chl new file mode 100644 index 00000000..d4d178f3 --- /dev/null +++ b/testcase/KB/INIT_NWM_KB_FABM_ROSENMCARTUR/TRASH/INIT.P2_Chl @@ -0,0 +1,43 @@ +0.10000000000000000000 +0.10000000000000000000 +0.10000000000000000000 +0.10000000000000000000 +0.10000000000000000000 +0.10000000000000000000 +0.10000000000000000000 +0.10000000000000000000 +0.10000000000000000000 +0.10000000000000000000 +0.10000000000000000000 +0.10000000000000000000 +0.10000000000000000000 +0.00000000001000000000 +0.00000000001000000000 +0.00000000001000000000 +0.00000000001000000000 +0.00000000001000000000 +0.00000000001000000000 +0.00000000001000000000 +0.00000000001000000000 +0.00000000001000000000 +0.00000000001000000000 +0.00000000001000000000 +0.00000000001000000000 +0.00000000001000000000 +0.00000000001000000000 +0.00000000001000000000 +0.00000000001000000000 +0.00000000001000000000 +0.00000000001000000000 +0.00000000001000000000 +0.00000000001000000000 +0.00000000001000000000 +0.00000000001000000000 +0.00000000001000000000 +0.00000000001000000000 +0.00000000001000000000 +0.00000000001000000000 +0.00000000001000000000 +0.00000000001000000000 +0.00000000001000000000 +0.00000000001000000000 diff --git a/testcase/KB/INIT_NWM_KB_FABM_ROSENMCARTUR/TRASH/INIT.P2_c b/testcase/KB/INIT_NWM_KB_FABM_ROSENMCARTUR/TRASH/INIT.P2_c new file mode 100644 index 00000000..b938c94d --- /dev/null +++ b/testcase/KB/INIT_NWM_KB_FABM_ROSENMCARTUR/TRASH/INIT.P2_c @@ -0,0 +1,43 @@ +8.00000000000000000000 +8.00000000000000000000 +8.00000000000000000000 +8.00000000000000000000 +8.00000000000000000000 +8.00000000000000000000 +8.00000000000000000000 +8.00000000000000000000 +8.00000000000000000000 +8.00000000000000000000 +8.00000000000000000000 +8.00000000000000000000 +8.00000000000000000000 +0.00000000080000000000 +0.00000000080000000000 +0.00000000080000000000 +0.00000000080000000000 +0.00000000080000000000 +0.00000000080000000000 +0.00000000080000000000 +0.00000000080000000000 +0.00000000080000000000 +0.00000000080000000000 +0.00000000080000000000 +0.00000000080000000000 +0.00000000080000000000 +0.00000000080000000000 +0.00000000080000000000 +0.00000000080000000000 +0.00000000080000000000 +0.00000000080000000000 +0.00000000080000000000 +0.00000000080000000000 +0.00000000080000000000 +0.00000000080000000000 +0.00000000080000000000 +0.00000000080000000000 +0.00000000080000000000 +0.00000000080000000000 +0.00000000080000000000 +0.00000000080000000000 +0.00000000080000000000 +0.00000000080000000000 diff --git a/testcase/KB/INIT_NWM_KB_FABM_ROSENMCARTUR/TRASH/INIT.P2_n b/testcase/KB/INIT_NWM_KB_FABM_ROSENMCARTUR/TRASH/INIT.P2_n new file mode 100644 index 00000000..e97c5017 --- /dev/null +++ b/testcase/KB/INIT_NWM_KB_FABM_ROSENMCARTUR/TRASH/INIT.P2_n @@ -0,0 +1,43 @@ +0.01000000000000000000 +0.01000000000000000000 +0.01000000000000000000 +0.01000000000000000000 +0.01000000000000000000 +0.01000000000000000000 +0.01000000000000000000 +0.01000000000000000000 +0.01000000000000000000 +0.01000000000000000000 +0.01000000000000000000 +0.01000000000000000000 +0.01000000000000000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 diff --git a/testcase/KB/INIT_NWM_KB_FABM_ROSENMCARTUR/TRASH/INIT.P2_p b/testcase/KB/INIT_NWM_KB_FABM_ROSENMCARTUR/TRASH/INIT.P2_p new file mode 100644 index 00000000..16c4ec30 --- /dev/null +++ b/testcase/KB/INIT_NWM_KB_FABM_ROSENMCARTUR/TRASH/INIT.P2_p @@ -0,0 +1,43 @@ +0.00010000000000000000 +0.00010000000000000000 +0.00010000000000000000 +0.00010000000000000000 +0.00010000000000000000 +0.00010000000000000000 +0.00010000000000000000 +0.00010000000000000000 +0.00010000000000000000 +0.00010000000000000000 +0.00010000000000000000 +0.00010000000000000000 +0.00010000000000000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 diff --git a/testcase/KB/INIT_NWM_KB_FABM_ROSENMCARTUR/TRASH/INIT.P3_Chl b/testcase/KB/INIT_NWM_KB_FABM_ROSENMCARTUR/TRASH/INIT.P3_Chl new file mode 100644 index 00000000..d4d178f3 --- /dev/null +++ b/testcase/KB/INIT_NWM_KB_FABM_ROSENMCARTUR/TRASH/INIT.P3_Chl @@ -0,0 +1,43 @@ +0.10000000000000000000 +0.10000000000000000000 +0.10000000000000000000 +0.10000000000000000000 +0.10000000000000000000 +0.10000000000000000000 +0.10000000000000000000 +0.10000000000000000000 +0.10000000000000000000 +0.10000000000000000000 +0.10000000000000000000 +0.10000000000000000000 +0.10000000000000000000 +0.00000000001000000000 +0.00000000001000000000 +0.00000000001000000000 +0.00000000001000000000 +0.00000000001000000000 +0.00000000001000000000 +0.00000000001000000000 +0.00000000001000000000 +0.00000000001000000000 +0.00000000001000000000 +0.00000000001000000000 +0.00000000001000000000 +0.00000000001000000000 +0.00000000001000000000 +0.00000000001000000000 +0.00000000001000000000 +0.00000000001000000000 +0.00000000001000000000 +0.00000000001000000000 +0.00000000001000000000 +0.00000000001000000000 +0.00000000001000000000 +0.00000000001000000000 +0.00000000001000000000 +0.00000000001000000000 +0.00000000001000000000 +0.00000000001000000000 +0.00000000001000000000 +0.00000000001000000000 +0.00000000001000000000 diff --git a/testcase/KB/INIT_NWM_KB_FABM_ROSENMCARTUR/TRASH/INIT.P3_c b/testcase/KB/INIT_NWM_KB_FABM_ROSENMCARTUR/TRASH/INIT.P3_c new file mode 100644 index 00000000..b938c94d --- /dev/null +++ b/testcase/KB/INIT_NWM_KB_FABM_ROSENMCARTUR/TRASH/INIT.P3_c @@ -0,0 +1,43 @@ +8.00000000000000000000 +8.00000000000000000000 +8.00000000000000000000 +8.00000000000000000000 +8.00000000000000000000 +8.00000000000000000000 +8.00000000000000000000 +8.00000000000000000000 +8.00000000000000000000 +8.00000000000000000000 +8.00000000000000000000 +8.00000000000000000000 +8.00000000000000000000 +0.00000000080000000000 +0.00000000080000000000 +0.00000000080000000000 +0.00000000080000000000 +0.00000000080000000000 +0.00000000080000000000 +0.00000000080000000000 +0.00000000080000000000 +0.00000000080000000000 +0.00000000080000000000 +0.00000000080000000000 +0.00000000080000000000 +0.00000000080000000000 +0.00000000080000000000 +0.00000000080000000000 +0.00000000080000000000 +0.00000000080000000000 +0.00000000080000000000 +0.00000000080000000000 +0.00000000080000000000 +0.00000000080000000000 +0.00000000080000000000 +0.00000000080000000000 +0.00000000080000000000 +0.00000000080000000000 +0.00000000080000000000 +0.00000000080000000000 +0.00000000080000000000 +0.00000000080000000000 +0.00000000080000000000 diff --git a/testcase/KB/INIT_NWM_KB_FABM_ROSENMCARTUR/TRASH/INIT.P3_n b/testcase/KB/INIT_NWM_KB_FABM_ROSENMCARTUR/TRASH/INIT.P3_n new file mode 100644 index 00000000..e97c5017 --- /dev/null +++ b/testcase/KB/INIT_NWM_KB_FABM_ROSENMCARTUR/TRASH/INIT.P3_n @@ -0,0 +1,43 @@ +0.01000000000000000000 +0.01000000000000000000 +0.01000000000000000000 +0.01000000000000000000 +0.01000000000000000000 +0.01000000000000000000 +0.01000000000000000000 +0.01000000000000000000 +0.01000000000000000000 +0.01000000000000000000 +0.01000000000000000000 +0.01000000000000000000 +0.01000000000000000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 diff --git a/testcase/KB/INIT_NWM_KB_FABM_ROSENMCARTUR/TRASH/INIT.P3_p b/testcase/KB/INIT_NWM_KB_FABM_ROSENMCARTUR/TRASH/INIT.P3_p new file mode 100644 index 00000000..16c4ec30 --- /dev/null +++ b/testcase/KB/INIT_NWM_KB_FABM_ROSENMCARTUR/TRASH/INIT.P3_p @@ -0,0 +1,43 @@ +0.00010000000000000000 +0.00010000000000000000 +0.00010000000000000000 +0.00010000000000000000 +0.00010000000000000000 +0.00010000000000000000 +0.00010000000000000000 +0.00010000000000000000 +0.00010000000000000000 +0.00010000000000000000 +0.00010000000000000000 +0.00010000000000000000 +0.00010000000000000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 diff --git a/testcase/KB/INIT_NWM_KB_FABM_ROSENMCARTUR/TRASH/INIT.P4_Chl b/testcase/KB/INIT_NWM_KB_FABM_ROSENMCARTUR/TRASH/INIT.P4_Chl new file mode 100644 index 00000000..d4d178f3 --- /dev/null +++ b/testcase/KB/INIT_NWM_KB_FABM_ROSENMCARTUR/TRASH/INIT.P4_Chl @@ -0,0 +1,43 @@ +0.10000000000000000000 +0.10000000000000000000 +0.10000000000000000000 +0.10000000000000000000 +0.10000000000000000000 +0.10000000000000000000 +0.10000000000000000000 +0.10000000000000000000 +0.10000000000000000000 +0.10000000000000000000 +0.10000000000000000000 +0.10000000000000000000 +0.10000000000000000000 +0.00000000001000000000 +0.00000000001000000000 +0.00000000001000000000 +0.00000000001000000000 +0.00000000001000000000 +0.00000000001000000000 +0.00000000001000000000 +0.00000000001000000000 +0.00000000001000000000 +0.00000000001000000000 +0.00000000001000000000 +0.00000000001000000000 +0.00000000001000000000 +0.00000000001000000000 +0.00000000001000000000 +0.00000000001000000000 +0.00000000001000000000 +0.00000000001000000000 +0.00000000001000000000 +0.00000000001000000000 +0.00000000001000000000 +0.00000000001000000000 +0.00000000001000000000 +0.00000000001000000000 +0.00000000001000000000 +0.00000000001000000000 +0.00000000001000000000 +0.00000000001000000000 +0.00000000001000000000 +0.00000000001000000000 diff --git a/testcase/KB/INIT_NWM_KB_FABM_ROSENMCARTUR/TRASH/INIT.P4_c b/testcase/KB/INIT_NWM_KB_FABM_ROSENMCARTUR/TRASH/INIT.P4_c new file mode 100644 index 00000000..b938c94d --- /dev/null +++ b/testcase/KB/INIT_NWM_KB_FABM_ROSENMCARTUR/TRASH/INIT.P4_c @@ -0,0 +1,43 @@ +8.00000000000000000000 +8.00000000000000000000 +8.00000000000000000000 +8.00000000000000000000 +8.00000000000000000000 +8.00000000000000000000 +8.00000000000000000000 +8.00000000000000000000 +8.00000000000000000000 +8.00000000000000000000 +8.00000000000000000000 +8.00000000000000000000 +8.00000000000000000000 +0.00000000080000000000 +0.00000000080000000000 +0.00000000080000000000 +0.00000000080000000000 +0.00000000080000000000 +0.00000000080000000000 +0.00000000080000000000 +0.00000000080000000000 +0.00000000080000000000 +0.00000000080000000000 +0.00000000080000000000 +0.00000000080000000000 +0.00000000080000000000 +0.00000000080000000000 +0.00000000080000000000 +0.00000000080000000000 +0.00000000080000000000 +0.00000000080000000000 +0.00000000080000000000 +0.00000000080000000000 +0.00000000080000000000 +0.00000000080000000000 +0.00000000080000000000 +0.00000000080000000000 +0.00000000080000000000 +0.00000000080000000000 +0.00000000080000000000 +0.00000000080000000000 +0.00000000080000000000 +0.00000000080000000000 diff --git a/testcase/KB/INIT_NWM_KB_FABM_ROSENMCARTUR/TRASH/INIT.P4_n b/testcase/KB/INIT_NWM_KB_FABM_ROSENMCARTUR/TRASH/INIT.P4_n new file mode 100644 index 00000000..e97c5017 --- /dev/null +++ b/testcase/KB/INIT_NWM_KB_FABM_ROSENMCARTUR/TRASH/INIT.P4_n @@ -0,0 +1,43 @@ +0.01000000000000000000 +0.01000000000000000000 +0.01000000000000000000 +0.01000000000000000000 +0.01000000000000000000 +0.01000000000000000000 +0.01000000000000000000 +0.01000000000000000000 +0.01000000000000000000 +0.01000000000000000000 +0.01000000000000000000 +0.01000000000000000000 +0.01000000000000000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 diff --git a/testcase/KB/INIT_NWM_KB_FABM_ROSENMCARTUR/TRASH/INIT.P4_p b/testcase/KB/INIT_NWM_KB_FABM_ROSENMCARTUR/TRASH/INIT.P4_p new file mode 100644 index 00000000..16c4ec30 --- /dev/null +++ b/testcase/KB/INIT_NWM_KB_FABM_ROSENMCARTUR/TRASH/INIT.P4_p @@ -0,0 +1,43 @@ +0.00010000000000000000 +0.00010000000000000000 +0.00010000000000000000 +0.00010000000000000000 +0.00010000000000000000 +0.00010000000000000000 +0.00010000000000000000 +0.00010000000000000000 +0.00010000000000000000 +0.00010000000000000000 +0.00010000000000000000 +0.00010000000000000000 +0.00010000000000000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 diff --git a/testcase/KB/INIT_NWM_KB_FABM_ROSENMCARTUR/TRASH/INIT.R1_c b/testcase/KB/INIT_NWM_KB_FABM_ROSENMCARTUR/TRASH/INIT.R1_c new file mode 100644 index 00000000..e97c5017 --- /dev/null +++ b/testcase/KB/INIT_NWM_KB_FABM_ROSENMCARTUR/TRASH/INIT.R1_c @@ -0,0 +1,43 @@ +0.01000000000000000000 +0.01000000000000000000 +0.01000000000000000000 +0.01000000000000000000 +0.01000000000000000000 +0.01000000000000000000 +0.01000000000000000000 +0.01000000000000000000 +0.01000000000000000000 +0.01000000000000000000 +0.01000000000000000000 +0.01000000000000000000 +0.01000000000000000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 diff --git a/testcase/KB/INIT_NWM_KB_FABM_ROSENMCARTUR/TRASH/INIT.R1_n b/testcase/KB/INIT_NWM_KB_FABM_ROSENMCARTUR/TRASH/INIT.R1_n new file mode 100644 index 00000000..fce7c08f --- /dev/null +++ b/testcase/KB/INIT_NWM_KB_FABM_ROSENMCARTUR/TRASH/INIT.R1_n @@ -0,0 +1,43 @@ +0.00040000000000000000 +0.00040000000000000000 +0.00040000000000000000 +0.00040000000000000000 +0.00040000000000000000 +0.00040000000000000000 +0.00040000000000000000 +0.00040000000000000000 +0.00040000000000000000 +0.00040000000000000000 +0.00040000000000000000 +0.00040000000000000000 +0.00040000000000000000 +0.00000000000004000000 +0.00000000000004000000 +0.00000000000004000000 +0.00000000000004000000 +0.00000000000004000000 +0.00000000000004000000 +0.00000000000004000000 +0.00000000000004000000 +0.00000000000004000000 +0.00000000000004000000 +0.00000000000004000000 +0.00000000000004000000 +0.00000000000004000000 +0.00000000000004000000 +0.00000000000004000000 +0.00000000000004000000 +0.00000000000004000000 +0.00000000000004000000 +0.00000000000004000000 +0.00000000000004000000 +0.00000000000004000000 +0.00000000000004000000 +0.00000000000004000000 +0.00000000000004000000 +0.00000000000004000000 +0.00000000000004000000 +0.00000000000004000000 +0.00000000000004000000 +0.00000000000004000000 +0.00000000000004000000 diff --git a/testcase/KB/INIT_NWM_KB_FABM_ROSENMCARTUR/TRASH/INIT.R1_p b/testcase/KB/INIT_NWM_KB_FABM_ROSENMCARTUR/TRASH/INIT.R1_p new file mode 100644 index 00000000..d3eeb65b --- /dev/null +++ b/testcase/KB/INIT_NWM_KB_FABM_ROSENMCARTUR/TRASH/INIT.R1_p @@ -0,0 +1,43 @@ +0.00004000000000000000 +0.00004000000000000000 +0.00004000000000000000 +0.00004000000000000000 +0.00004000000000000000 +0.00004000000000000000 +0.00004000000000000000 +0.00004000000000000000 +0.00004000000000000000 +0.00004000000000000000 +0.00004000000000000000 +0.00004000000000000000 +0.00004000000000000000 +0.00000000000000400000 +0.00000000000000400000 +0.00000000000000400000 +0.00000000000000400000 +0.00000000000000400000 +0.00000000000000400000 +0.00000000000000400000 +0.00000000000000400000 +0.00000000000000400000 +0.00000000000000400000 +0.00000000000000400000 +0.00000000000000400000 +0.00000000000000400000 +0.00000000000000400000 +0.00000000000000400000 +0.00000000000000400000 +0.00000000000000400000 +0.00000000000000400000 +0.00000000000000400000 +0.00000000000000400000 +0.00000000000000400000 +0.00000000000000400000 +0.00000000000000400000 +0.00000000000000400000 +0.00000000000000400000 +0.00000000000000400000 +0.00000000000000400000 +0.00000000000000400000 +0.00000000000000400000 +0.00000000000000400000 diff --git a/testcase/KB/INIT_NWM_KB_FABM_ROSENMCARTUR/TRASH/INIT.R1_s b/testcase/KB/INIT_NWM_KB_FABM_ROSENMCARTUR/TRASH/INIT.R1_s new file mode 100644 index 00000000..79a0ae8c --- /dev/null +++ b/testcase/KB/INIT_NWM_KB_FABM_ROSENMCARTUR/TRASH/INIT.R1_s @@ -0,0 +1,43 @@ +0.00000100000000000000 +0.00000100000000000000 +0.00000100000000000000 +0.00000100000000000000 +0.00000100000000000000 +0.00000100000000000000 +0.00000100000000000000 +0.00000100000000000000 +0.00000100000000000000 +0.00000100000000000000 +0.00000100000000000000 +0.00000100000000000000 +0.00000100000000000000 +0.00000000000000010000 +0.00000000000000010000 +0.00000000000000010000 +0.00000000000000010000 +0.00000000000000010000 +0.00000000000000010000 +0.00000000000000010000 +0.00000000000000010000 +0.00000000000000010000 +0.00000000000000010000 +0.00000000000000010000 +0.00000000000000010000 +0.00000000000000010000 +0.00000000000000010000 +0.00000000000000010000 +0.00000000000000010000 +0.00000000000000010000 +0.00000000000000010000 +0.00000000000000010000 +0.00000000000000010000 +0.00000000000000010000 +0.00000000000000010000 +0.00000000000000010000 +0.00000000000000010000 +0.00000000000000010000 +0.00000000000000010000 +0.00000000000000010000 +0.00000000000000010000 +0.00000000000000010000 +0.00000000000000010000 diff --git a/testcase/KB/INIT_NWM_KB_FABM_ROSENMCARTUR/TRASH/INIT.R2_c b/testcase/KB/INIT_NWM_KB_FABM_ROSENMCARTUR/TRASH/INIT.R2_c new file mode 100644 index 00000000..e97c5017 --- /dev/null +++ b/testcase/KB/INIT_NWM_KB_FABM_ROSENMCARTUR/TRASH/INIT.R2_c @@ -0,0 +1,43 @@ +0.01000000000000000000 +0.01000000000000000000 +0.01000000000000000000 +0.01000000000000000000 +0.01000000000000000000 +0.01000000000000000000 +0.01000000000000000000 +0.01000000000000000000 +0.01000000000000000000 +0.01000000000000000000 +0.01000000000000000000 +0.01000000000000000000 +0.01000000000000000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 diff --git a/testcase/KB/INIT_NWM_KB_FABM_ROSENMCARTUR/TRASH/INIT.R3_c b/testcase/KB/INIT_NWM_KB_FABM_ROSENMCARTUR/TRASH/INIT.R3_c new file mode 100644 index 00000000..16c4ec30 --- /dev/null +++ b/testcase/KB/INIT_NWM_KB_FABM_ROSENMCARTUR/TRASH/INIT.R3_c @@ -0,0 +1,43 @@ +0.00010000000000000000 +0.00010000000000000000 +0.00010000000000000000 +0.00010000000000000000 +0.00010000000000000000 +0.00010000000000000000 +0.00010000000000000000 +0.00010000000000000000 +0.00010000000000000000 +0.00010000000000000000 +0.00010000000000000000 +0.00010000000000000000 +0.00010000000000000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 diff --git a/testcase/KB/INIT_NWM_KB_FABM_ROSENMCARTUR/TRASH/INIT.R6_c b/testcase/KB/INIT_NWM_KB_FABM_ROSENMCARTUR/TRASH/INIT.R6_c new file mode 100644 index 00000000..e97c5017 --- /dev/null +++ b/testcase/KB/INIT_NWM_KB_FABM_ROSENMCARTUR/TRASH/INIT.R6_c @@ -0,0 +1,43 @@ +0.01000000000000000000 +0.01000000000000000000 +0.01000000000000000000 +0.01000000000000000000 +0.01000000000000000000 +0.01000000000000000000 +0.01000000000000000000 +0.01000000000000000000 +0.01000000000000000000 +0.01000000000000000000 +0.01000000000000000000 +0.01000000000000000000 +0.01000000000000000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 diff --git a/testcase/KB/INIT_NWM_KB_FABM_ROSENMCARTUR/TRASH/INIT.R6_n b/testcase/KB/INIT_NWM_KB_FABM_ROSENMCARTUR/TRASH/INIT.R6_n new file mode 100644 index 00000000..c86f9c71 --- /dev/null +++ b/testcase/KB/INIT_NWM_KB_FABM_ROSENMCARTUR/TRASH/INIT.R6_n @@ -0,0 +1,43 @@ +0.00100000000000000000 +0.00100000000000000000 +0.00100000000000000000 +0.00100000000000000000 +0.00100000000000000000 +0.00100000000000000000 +0.00100000000000000000 +0.00100000000000000000 +0.00100000000000000000 +0.00100000000000000000 +0.00100000000000000000 +0.00100000000000000000 +0.00100000000000000000 +0.00000000000010000000 +0.00000000000010000000 +0.00000000000010000000 +0.00000000000010000000 +0.00000000000010000000 +0.00000000000010000000 +0.00000000000010000000 +0.00000000000010000000 +0.00000000000010000000 +0.00000000000010000000 +0.00000000000010000000 +0.00000000000010000000 +0.00000000000010000000 +0.00000000000010000000 +0.00000000000010000000 +0.00000000000010000000 +0.00000000000010000000 +0.00000000000010000000 +0.00000000000010000000 +0.00000000000010000000 +0.00000000000010000000 +0.00000000000010000000 +0.00000000000010000000 +0.00000000000010000000 +0.00000000000010000000 +0.00000000000010000000 +0.00000000000010000000 +0.00000000000010000000 +0.00000000000010000000 +0.00000000000010000000 diff --git a/testcase/KB/INIT_NWM_KB_FABM_ROSENMCARTUR/TRASH/INIT.R6_p b/testcase/KB/INIT_NWM_KB_FABM_ROSENMCARTUR/TRASH/INIT.R6_p new file mode 100644 index 00000000..16c4ec30 --- /dev/null +++ b/testcase/KB/INIT_NWM_KB_FABM_ROSENMCARTUR/TRASH/INIT.R6_p @@ -0,0 +1,43 @@ +0.00010000000000000000 +0.00010000000000000000 +0.00010000000000000000 +0.00010000000000000000 +0.00010000000000000000 +0.00010000000000000000 +0.00010000000000000000 +0.00010000000000000000 +0.00010000000000000000 +0.00010000000000000000 +0.00010000000000000000 +0.00010000000000000000 +0.00010000000000000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 diff --git a/testcase/KB/INIT_NWM_KB_FABM_ROSENMCARTUR/TRASH/INIT.R6_s b/testcase/KB/INIT_NWM_KB_FABM_ROSENMCARTUR/TRASH/INIT.R6_s new file mode 100644 index 00000000..c86f9c71 --- /dev/null +++ b/testcase/KB/INIT_NWM_KB_FABM_ROSENMCARTUR/TRASH/INIT.R6_s @@ -0,0 +1,43 @@ +0.00100000000000000000 +0.00100000000000000000 +0.00100000000000000000 +0.00100000000000000000 +0.00100000000000000000 +0.00100000000000000000 +0.00100000000000000000 +0.00100000000000000000 +0.00100000000000000000 +0.00100000000000000000 +0.00100000000000000000 +0.00100000000000000000 +0.00100000000000000000 +0.00000000000010000000 +0.00000000000010000000 +0.00000000000010000000 +0.00000000000010000000 +0.00000000000010000000 +0.00000000000010000000 +0.00000000000010000000 +0.00000000000010000000 +0.00000000000010000000 +0.00000000000010000000 +0.00000000000010000000 +0.00000000000010000000 +0.00000000000010000000 +0.00000000000010000000 +0.00000000000010000000 +0.00000000000010000000 +0.00000000000010000000 +0.00000000000010000000 +0.00000000000010000000 +0.00000000000010000000 +0.00000000000010000000 +0.00000000000010000000 +0.00000000000010000000 +0.00000000000010000000 +0.00000000000010000000 +0.00000000000010000000 +0.00000000000010000000 +0.00000000000010000000 +0.00000000000010000000 +0.00000000000010000000 diff --git a/testcase/KB/INIT_NWM_KB_FABM_ROSENMCARTUR/TRASH/INIT.R8_c b/testcase/KB/INIT_NWM_KB_FABM_ROSENMCARTUR/TRASH/INIT.R8_c new file mode 100644 index 00000000..e97c5017 --- /dev/null +++ b/testcase/KB/INIT_NWM_KB_FABM_ROSENMCARTUR/TRASH/INIT.R8_c @@ -0,0 +1,43 @@ +0.01000000000000000000 +0.01000000000000000000 +0.01000000000000000000 +0.01000000000000000000 +0.01000000000000000000 +0.01000000000000000000 +0.01000000000000000000 +0.01000000000000000000 +0.01000000000000000000 +0.01000000000000000000 +0.01000000000000000000 +0.01000000000000000000 +0.01000000000000000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 +0.00000000000100000000 diff --git a/testcase/KB/INIT_NWM_KB_FABM_ROSENMCARTUR/TRASH/INIT.R8_n b/testcase/KB/INIT_NWM_KB_FABM_ROSENMCARTUR/TRASH/INIT.R8_n new file mode 100644 index 00000000..c86f9c71 --- /dev/null +++ b/testcase/KB/INIT_NWM_KB_FABM_ROSENMCARTUR/TRASH/INIT.R8_n @@ -0,0 +1,43 @@ +0.00100000000000000000 +0.00100000000000000000 +0.00100000000000000000 +0.00100000000000000000 +0.00100000000000000000 +0.00100000000000000000 +0.00100000000000000000 +0.00100000000000000000 +0.00100000000000000000 +0.00100000000000000000 +0.00100000000000000000 +0.00100000000000000000 +0.00100000000000000000 +0.00000000000010000000 +0.00000000000010000000 +0.00000000000010000000 +0.00000000000010000000 +0.00000000000010000000 +0.00000000000010000000 +0.00000000000010000000 +0.00000000000010000000 +0.00000000000010000000 +0.00000000000010000000 +0.00000000000010000000 +0.00000000000010000000 +0.00000000000010000000 +0.00000000000010000000 +0.00000000000010000000 +0.00000000000010000000 +0.00000000000010000000 +0.00000000000010000000 +0.00000000000010000000 +0.00000000000010000000 +0.00000000000010000000 +0.00000000000010000000 +0.00000000000010000000 +0.00000000000010000000 +0.00000000000010000000 +0.00000000000010000000 +0.00000000000010000000 +0.00000000000010000000 +0.00000000000010000000 +0.00000000000010000000 diff --git a/testcase/KB/INIT_NWM_KB_FABM_ROSENMCARTUR/TRASH/INIT.R8_p b/testcase/KB/INIT_NWM_KB_FABM_ROSENMCARTUR/TRASH/INIT.R8_p new file mode 100644 index 00000000..16c4ec30 --- /dev/null +++ b/testcase/KB/INIT_NWM_KB_FABM_ROSENMCARTUR/TRASH/INIT.R8_p @@ -0,0 +1,43 @@ +0.00010000000000000000 +0.00010000000000000000 +0.00010000000000000000 +0.00010000000000000000 +0.00010000000000000000 +0.00010000000000000000 +0.00010000000000000000 +0.00010000000000000000 +0.00010000000000000000 +0.00010000000000000000 +0.00010000000000000000 +0.00010000000000000000 +0.00010000000000000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 diff --git a/testcase/KB/INIT_NWM_KB_FABM_ROSENMCARTUR/TRASH/INIT.R8_s b/testcase/KB/INIT_NWM_KB_FABM_ROSENMCARTUR/TRASH/INIT.R8_s new file mode 100644 index 00000000..c86f9c71 --- /dev/null +++ b/testcase/KB/INIT_NWM_KB_FABM_ROSENMCARTUR/TRASH/INIT.R8_s @@ -0,0 +1,43 @@ +0.00100000000000000000 +0.00100000000000000000 +0.00100000000000000000 +0.00100000000000000000 +0.00100000000000000000 +0.00100000000000000000 +0.00100000000000000000 +0.00100000000000000000 +0.00100000000000000000 +0.00100000000000000000 +0.00100000000000000000 +0.00100000000000000000 +0.00100000000000000000 +0.00000000000010000000 +0.00000000000010000000 +0.00000000000010000000 +0.00000000000010000000 +0.00000000000010000000 +0.00000000000010000000 +0.00000000000010000000 +0.00000000000010000000 +0.00000000000010000000 +0.00000000000010000000 +0.00000000000010000000 +0.00000000000010000000 +0.00000000000010000000 +0.00000000000010000000 +0.00000000000010000000 +0.00000000000010000000 +0.00000000000010000000 +0.00000000000010000000 +0.00000000000010000000 +0.00000000000010000000 +0.00000000000010000000 +0.00000000000010000000 +0.00000000000010000000 +0.00000000000010000000 +0.00000000000010000000 +0.00000000000010000000 +0.00000000000010000000 +0.00000000000010000000 +0.00000000000010000000 +0.00000000000010000000 diff --git a/testcase/KB/INIT_NWM_KB_FABM_ROSENMCARTUR/TRASH/INIT.X1_c b/testcase/KB/INIT_NWM_KB_FABM_ROSENMCARTUR/TRASH/INIT.X1_c new file mode 100644 index 00000000..16c4ec30 --- /dev/null +++ b/testcase/KB/INIT_NWM_KB_FABM_ROSENMCARTUR/TRASH/INIT.X1_c @@ -0,0 +1,43 @@ +0.00010000000000000000 +0.00010000000000000000 +0.00010000000000000000 +0.00010000000000000000 +0.00010000000000000000 +0.00010000000000000000 +0.00010000000000000000 +0.00010000000000000000 +0.00010000000000000000 +0.00010000000000000000 +0.00010000000000000000 +0.00010000000000000000 +0.00010000000000000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 diff --git a/testcase/KB/INIT_NWM_KB_FABM_ROSENMCARTUR/TRASH/INIT.X2_c b/testcase/KB/INIT_NWM_KB_FABM_ROSENMCARTUR/TRASH/INIT.X2_c new file mode 100644 index 00000000..16c4ec30 --- /dev/null +++ b/testcase/KB/INIT_NWM_KB_FABM_ROSENMCARTUR/TRASH/INIT.X2_c @@ -0,0 +1,43 @@ +0.00010000000000000000 +0.00010000000000000000 +0.00010000000000000000 +0.00010000000000000000 +0.00010000000000000000 +0.00010000000000000000 +0.00010000000000000000 +0.00010000000000000000 +0.00010000000000000000 +0.00010000000000000000 +0.00010000000000000000 +0.00010000000000000000 +0.00010000000000000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 diff --git a/testcase/KB/INIT_NWM_KB_FABM_ROSENMCARTUR/TRASH/INIT.X3_c b/testcase/KB/INIT_NWM_KB_FABM_ROSENMCARTUR/TRASH/INIT.X3_c new file mode 100644 index 00000000..16c4ec30 --- /dev/null +++ b/testcase/KB/INIT_NWM_KB_FABM_ROSENMCARTUR/TRASH/INIT.X3_c @@ -0,0 +1,43 @@ +0.00010000000000000000 +0.00010000000000000000 +0.00010000000000000000 +0.00010000000000000000 +0.00010000000000000000 +0.00010000000000000000 +0.00010000000000000000 +0.00010000000000000000 +0.00010000000000000000 +0.00010000000000000000 +0.00010000000000000000 +0.00010000000000000000 +0.00010000000000000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 +0.00000000000001000000 diff --git a/testcase/KB/INIT_NWM_KB_FABM_ROSENMCARTUR/TRASH/INIT.Z3_c b/testcase/KB/INIT_NWM_KB_FABM_ROSENMCARTUR/TRASH/INIT.Z3_c new file mode 100644 index 00000000..399fb79a --- /dev/null +++ b/testcase/KB/INIT_NWM_KB_FABM_ROSENMCARTUR/TRASH/INIT.Z3_c @@ -0,0 +1,43 @@ +1.20000000000000000000 +1.20000000000000000000 +1.20000000000000000000 +1.20000000000000000000 +1.20000000000000000000 +1.20000000000000000000 +1.20000000000000000000 +1.20000000000000000000 +1.20000000000000000000 +1.20000000000000000000 +1.20000000000000000000 +1.20000000000000000000 +1.20000000000000000000 +0.00000000012000000000 +0.00000000012000000000 +0.00000000012000000000 +0.00000000012000000000 +0.00000000012000000000 +0.00000000012000000000 +0.00000000012000000000 +0.00000000012000000000 +0.00000000012000000000 +0.00000000012000000000 +0.00000000012000000000 +0.00000000012000000000 +0.00000000012000000000 +0.00000000012000000000 +0.00000000012000000000 +0.00000000012000000000 +0.00000000012000000000 +0.00000000012000000000 +0.00000000012000000000 +0.00000000012000000000 +0.00000000012000000000 +0.00000000012000000000 +0.00000000012000000000 +0.00000000012000000000 +0.00000000012000000000 +0.00000000012000000000 +0.00000000012000000000 +0.00000000012000000000 +0.00000000012000000000 +0.00000000012000000000 diff --git a/testcase/KB/INIT_NWM_KB_FABM_ROSENMCARTUR/TRASH/INIT.Z3_n b/testcase/KB/INIT_NWM_KB_FABM_ROSENMCARTUR/TRASH/INIT.Z3_n new file mode 100644 index 00000000..15192773 --- /dev/null +++ b/testcase/KB/INIT_NWM_KB_FABM_ROSENMCARTUR/TRASH/INIT.Z3_n @@ -0,0 +1,43 @@ +0.01492537313432840000 +0.01492537313432840000 +0.01492537313432840000 +0.01492537313432840000 +0.01492537313432840000 +0.01492537313432840000 +0.01492537313432840000 +0.01492537313432840000 +0.01492537313432840000 +0.01492537313432840000 +0.01492537313432840000 +0.01492537313432840000 +0.01492537313432840000 +0.00000000000149253731 +0.00000000000149253731 +0.00000000000149253731 +0.00000000000149253731 +0.00000000000149253731 +0.00000000000149253731 +0.00000000000149253731 +0.00000000000149253731 +0.00000000000149253731 +0.00000000000149253731 +0.00000000000149253731 +0.00000000000149253731 +0.00000000000149253731 +0.00000000000149253731 +0.00000000000149253731 +0.00000000000149253731 +0.00000000000149253731 +0.00000000000149253731 +0.00000000000149253731 +0.00000000000149253731 +0.00000000000149253731 +0.00000000000149253731 +0.00000000000149253731 +0.00000000000149253731 +0.00000000000149253731 +0.00000000000149253731 +0.00000000000149253731 +0.00000000000149253731 +0.00000000000149253731 +0.00000000000149253731 diff --git a/testcase/KB/INIT_NWM_KB_FABM_ROSENMCARTUR/TRASH/INIT.Z3_p b/testcase/KB/INIT_NWM_KB_FABM_ROSENMCARTUR/TRASH/INIT.Z3_p new file mode 100644 index 00000000..868ce111 --- /dev/null +++ b/testcase/KB/INIT_NWM_KB_FABM_ROSENMCARTUR/TRASH/INIT.Z3_p @@ -0,0 +1,43 @@ +0.00094339622641509400 +0.00094339622641509400 +0.00094339622641509400 +0.00094339622641509400 +0.00094339622641509400 +0.00094339622641509400 +0.00094339622641509400 +0.00094339622641509400 +0.00094339622641509400 +0.00094339622641509400 +0.00094339622641509400 +0.00094339622641509400 +0.00094339622641509400 +0.00000000000009433962 +0.00000000000009433962 +0.00000000000009433962 +0.00000000000009433962 +0.00000000000009433962 +0.00000000000009433962 +0.00000000000009433962 +0.00000000000009433962 +0.00000000000009433962 +0.00000000000009433962 +0.00000000000009433962 +0.00000000000009433962 +0.00000000000009433962 +0.00000000000009433962 +0.00000000000009433962 +0.00000000000009433962 +0.00000000000009433962 +0.00000000000009433962 +0.00000000000009433962 +0.00000000000009433962 +0.00000000000009433962 +0.00000000000009433962 +0.00000000000009433962 +0.00000000000009433962 +0.00000000000009433962 +0.00000000000009433962 +0.00000000000009433962 +0.00000000000009433962 +0.00000000000009433962 +0.00000000000009433962 diff --git a/testcase/KB/INIT_NWM_KB_FABM_ROSENMCARTUR/TRASH/INIT.Z4_c b/testcase/KB/INIT_NWM_KB_FABM_ROSENMCARTUR/TRASH/INIT.Z4_c new file mode 100644 index 00000000..399fb79a --- /dev/null +++ b/testcase/KB/INIT_NWM_KB_FABM_ROSENMCARTUR/TRASH/INIT.Z4_c @@ -0,0 +1,43 @@ +1.20000000000000000000 +1.20000000000000000000 +1.20000000000000000000 +1.20000000000000000000 +1.20000000000000000000 +1.20000000000000000000 +1.20000000000000000000 +1.20000000000000000000 +1.20000000000000000000 +1.20000000000000000000 +1.20000000000000000000 +1.20000000000000000000 +1.20000000000000000000 +0.00000000012000000000 +0.00000000012000000000 +0.00000000012000000000 +0.00000000012000000000 +0.00000000012000000000 +0.00000000012000000000 +0.00000000012000000000 +0.00000000012000000000 +0.00000000012000000000 +0.00000000012000000000 +0.00000000012000000000 +0.00000000012000000000 +0.00000000012000000000 +0.00000000012000000000 +0.00000000012000000000 +0.00000000012000000000 +0.00000000012000000000 +0.00000000012000000000 +0.00000000012000000000 +0.00000000012000000000 +0.00000000012000000000 +0.00000000012000000000 +0.00000000012000000000 +0.00000000012000000000 +0.00000000012000000000 +0.00000000012000000000 +0.00000000012000000000 +0.00000000012000000000 +0.00000000012000000000 +0.00000000012000000000 diff --git a/testcase/KB/INIT_NWM_KB_FABM_ROSENMCARTUR/TRASH/INIT.Z4_n b/testcase/KB/INIT_NWM_KB_FABM_ROSENMCARTUR/TRASH/INIT.Z4_n new file mode 100644 index 00000000..15192773 --- /dev/null +++ b/testcase/KB/INIT_NWM_KB_FABM_ROSENMCARTUR/TRASH/INIT.Z4_n @@ -0,0 +1,43 @@ +0.01492537313432840000 +0.01492537313432840000 +0.01492537313432840000 +0.01492537313432840000 +0.01492537313432840000 +0.01492537313432840000 +0.01492537313432840000 +0.01492537313432840000 +0.01492537313432840000 +0.01492537313432840000 +0.01492537313432840000 +0.01492537313432840000 +0.01492537313432840000 +0.00000000000149253731 +0.00000000000149253731 +0.00000000000149253731 +0.00000000000149253731 +0.00000000000149253731 +0.00000000000149253731 +0.00000000000149253731 +0.00000000000149253731 +0.00000000000149253731 +0.00000000000149253731 +0.00000000000149253731 +0.00000000000149253731 +0.00000000000149253731 +0.00000000000149253731 +0.00000000000149253731 +0.00000000000149253731 +0.00000000000149253731 +0.00000000000149253731 +0.00000000000149253731 +0.00000000000149253731 +0.00000000000149253731 +0.00000000000149253731 +0.00000000000149253731 +0.00000000000149253731 +0.00000000000149253731 +0.00000000000149253731 +0.00000000000149253731 +0.00000000000149253731 +0.00000000000149253731 +0.00000000000149253731 diff --git a/testcase/KB/INIT_NWM_KB_FABM_ROSENMCARTUR/TRASH/INIT.Z4_p b/testcase/KB/INIT_NWM_KB_FABM_ROSENMCARTUR/TRASH/INIT.Z4_p new file mode 100644 index 00000000..868ce111 --- /dev/null +++ b/testcase/KB/INIT_NWM_KB_FABM_ROSENMCARTUR/TRASH/INIT.Z4_p @@ -0,0 +1,43 @@ +0.00094339622641509400 +0.00094339622641509400 +0.00094339622641509400 +0.00094339622641509400 +0.00094339622641509400 +0.00094339622641509400 +0.00094339622641509400 +0.00094339622641509400 +0.00094339622641509400 +0.00094339622641509400 +0.00094339622641509400 +0.00094339622641509400 +0.00094339622641509400 +0.00000000000009433962 +0.00000000000009433962 +0.00000000000009433962 +0.00000000000009433962 +0.00000000000009433962 +0.00000000000009433962 +0.00000000000009433962 +0.00000000000009433962 +0.00000000000009433962 +0.00000000000009433962 +0.00000000000009433962 +0.00000000000009433962 +0.00000000000009433962 +0.00000000000009433962 +0.00000000000009433962 +0.00000000000009433962 +0.00000000000009433962 +0.00000000000009433962 +0.00000000000009433962 +0.00000000000009433962 +0.00000000000009433962 +0.00000000000009433962 +0.00000000000009433962 +0.00000000000009433962 +0.00000000000009433962 +0.00000000000009433962 +0.00000000000009433962 +0.00000000000009433962 +0.00000000000009433962 +0.00000000000009433962 diff --git a/testcase/KB/INIT_NWM_KB_FABM_ROSENMCARTUR/TRASH/INIT.Z5_c b/testcase/KB/INIT_NWM_KB_FABM_ROSENMCARTUR/TRASH/INIT.Z5_c new file mode 100644 index 00000000..399fb79a --- /dev/null +++ b/testcase/KB/INIT_NWM_KB_FABM_ROSENMCARTUR/TRASH/INIT.Z5_c @@ -0,0 +1,43 @@ +1.20000000000000000000 +1.20000000000000000000 +1.20000000000000000000 +1.20000000000000000000 +1.20000000000000000000 +1.20000000000000000000 +1.20000000000000000000 +1.20000000000000000000 +1.20000000000000000000 +1.20000000000000000000 +1.20000000000000000000 +1.20000000000000000000 +1.20000000000000000000 +0.00000000012000000000 +0.00000000012000000000 +0.00000000012000000000 +0.00000000012000000000 +0.00000000012000000000 +0.00000000012000000000 +0.00000000012000000000 +0.00000000012000000000 +0.00000000012000000000 +0.00000000012000000000 +0.00000000012000000000 +0.00000000012000000000 +0.00000000012000000000 +0.00000000012000000000 +0.00000000012000000000 +0.00000000012000000000 +0.00000000012000000000 +0.00000000012000000000 +0.00000000012000000000 +0.00000000012000000000 +0.00000000012000000000 +0.00000000012000000000 +0.00000000012000000000 +0.00000000012000000000 +0.00000000012000000000 +0.00000000012000000000 +0.00000000012000000000 +0.00000000012000000000 +0.00000000012000000000 +0.00000000012000000000 diff --git a/testcase/KB/INIT_NWM_KB_FABM_ROSENMCARTUR/TRASH/INIT.Z5_n b/testcase/KB/INIT_NWM_KB_FABM_ROSENMCARTUR/TRASH/INIT.Z5_n new file mode 100644 index 00000000..15192773 --- /dev/null +++ b/testcase/KB/INIT_NWM_KB_FABM_ROSENMCARTUR/TRASH/INIT.Z5_n @@ -0,0 +1,43 @@ +0.01492537313432840000 +0.01492537313432840000 +0.01492537313432840000 +0.01492537313432840000 +0.01492537313432840000 +0.01492537313432840000 +0.01492537313432840000 +0.01492537313432840000 +0.01492537313432840000 +0.01492537313432840000 +0.01492537313432840000 +0.01492537313432840000 +0.01492537313432840000 +0.00000000000149253731 +0.00000000000149253731 +0.00000000000149253731 +0.00000000000149253731 +0.00000000000149253731 +0.00000000000149253731 +0.00000000000149253731 +0.00000000000149253731 +0.00000000000149253731 +0.00000000000149253731 +0.00000000000149253731 +0.00000000000149253731 +0.00000000000149253731 +0.00000000000149253731 +0.00000000000149253731 +0.00000000000149253731 +0.00000000000149253731 +0.00000000000149253731 +0.00000000000149253731 +0.00000000000149253731 +0.00000000000149253731 +0.00000000000149253731 +0.00000000000149253731 +0.00000000000149253731 +0.00000000000149253731 +0.00000000000149253731 +0.00000000000149253731 +0.00000000000149253731 +0.00000000000149253731 +0.00000000000149253731 diff --git a/testcase/KB/INIT_NWM_KB_FABM_ROSENMCARTUR/TRASH/INIT.Z5_p b/testcase/KB/INIT_NWM_KB_FABM_ROSENMCARTUR/TRASH/INIT.Z5_p new file mode 100644 index 00000000..868ce111 --- /dev/null +++ b/testcase/KB/INIT_NWM_KB_FABM_ROSENMCARTUR/TRASH/INIT.Z5_p @@ -0,0 +1,43 @@ +0.00094339622641509400 +0.00094339622641509400 +0.00094339622641509400 +0.00094339622641509400 +0.00094339622641509400 +0.00094339622641509400 +0.00094339622641509400 +0.00094339622641509400 +0.00094339622641509400 +0.00094339622641509400 +0.00094339622641509400 +0.00094339622641509400 +0.00094339622641509400 +0.00000000000009433962 +0.00000000000009433962 +0.00000000000009433962 +0.00000000000009433962 +0.00000000000009433962 +0.00000000000009433962 +0.00000000000009433962 +0.00000000000009433962 +0.00000000000009433962 +0.00000000000009433962 +0.00000000000009433962 +0.00000000000009433962 +0.00000000000009433962 +0.00000000000009433962 +0.00000000000009433962 +0.00000000000009433962 +0.00000000000009433962 +0.00000000000009433962 +0.00000000000009433962 +0.00000000000009433962 +0.00000000000009433962 +0.00000000000009433962 +0.00000000000009433962 +0.00000000000009433962 +0.00000000000009433962 +0.00000000000009433962 +0.00000000000009433962 +0.00000000000009433962 +0.00000000000009433962 +0.00000000000009433962 diff --git a/testcase/KB/INIT_NWM_KB_FABM_ROSENMCARTUR/TRASH/INIT.Z6_c b/testcase/KB/INIT_NWM_KB_FABM_ROSENMCARTUR/TRASH/INIT.Z6_c new file mode 100644 index 00000000..399fb79a --- /dev/null +++ b/testcase/KB/INIT_NWM_KB_FABM_ROSENMCARTUR/TRASH/INIT.Z6_c @@ -0,0 +1,43 @@ +1.20000000000000000000 +1.20000000000000000000 +1.20000000000000000000 +1.20000000000000000000 +1.20000000000000000000 +1.20000000000000000000 +1.20000000000000000000 +1.20000000000000000000 +1.20000000000000000000 +1.20000000000000000000 +1.20000000000000000000 +1.20000000000000000000 +1.20000000000000000000 +0.00000000012000000000 +0.00000000012000000000 +0.00000000012000000000 +0.00000000012000000000 +0.00000000012000000000 +0.00000000012000000000 +0.00000000012000000000 +0.00000000012000000000 +0.00000000012000000000 +0.00000000012000000000 +0.00000000012000000000 +0.00000000012000000000 +0.00000000012000000000 +0.00000000012000000000 +0.00000000012000000000 +0.00000000012000000000 +0.00000000012000000000 +0.00000000012000000000 +0.00000000012000000000 +0.00000000012000000000 +0.00000000012000000000 +0.00000000012000000000 +0.00000000012000000000 +0.00000000012000000000 +0.00000000012000000000 +0.00000000012000000000 +0.00000000012000000000 +0.00000000012000000000 +0.00000000012000000000 +0.00000000012000000000 diff --git a/testcase/KB/INIT_NWM_KB_FABM_ROSENMCARTUR/TRASH/INIT.Z6_n b/testcase/KB/INIT_NWM_KB_FABM_ROSENMCARTUR/TRASH/INIT.Z6_n new file mode 100644 index 00000000..15192773 --- /dev/null +++ b/testcase/KB/INIT_NWM_KB_FABM_ROSENMCARTUR/TRASH/INIT.Z6_n @@ -0,0 +1,43 @@ +0.01492537313432840000 +0.01492537313432840000 +0.01492537313432840000 +0.01492537313432840000 +0.01492537313432840000 +0.01492537313432840000 +0.01492537313432840000 +0.01492537313432840000 +0.01492537313432840000 +0.01492537313432840000 +0.01492537313432840000 +0.01492537313432840000 +0.01492537313432840000 +0.00000000000149253731 +0.00000000000149253731 +0.00000000000149253731 +0.00000000000149253731 +0.00000000000149253731 +0.00000000000149253731 +0.00000000000149253731 +0.00000000000149253731 +0.00000000000149253731 +0.00000000000149253731 +0.00000000000149253731 +0.00000000000149253731 +0.00000000000149253731 +0.00000000000149253731 +0.00000000000149253731 +0.00000000000149253731 +0.00000000000149253731 +0.00000000000149253731 +0.00000000000149253731 +0.00000000000149253731 +0.00000000000149253731 +0.00000000000149253731 +0.00000000000149253731 +0.00000000000149253731 +0.00000000000149253731 +0.00000000000149253731 +0.00000000000149253731 +0.00000000000149253731 +0.00000000000149253731 +0.00000000000149253731 diff --git a/testcase/KB/INIT_NWM_KB_FABM_ROSENMCARTUR/TRASH/INIT.Z6_p b/testcase/KB/INIT_NWM_KB_FABM_ROSENMCARTUR/TRASH/INIT.Z6_p new file mode 100644 index 00000000..868ce111 --- /dev/null +++ b/testcase/KB/INIT_NWM_KB_FABM_ROSENMCARTUR/TRASH/INIT.Z6_p @@ -0,0 +1,43 @@ +0.00094339622641509400 +0.00094339622641509400 +0.00094339622641509400 +0.00094339622641509400 +0.00094339622641509400 +0.00094339622641509400 +0.00094339622641509400 +0.00094339622641509400 +0.00094339622641509400 +0.00094339622641509400 +0.00094339622641509400 +0.00094339622641509400 +0.00094339622641509400 +0.00000000000009433962 +0.00000000000009433962 +0.00000000000009433962 +0.00000000000009433962 +0.00000000000009433962 +0.00000000000009433962 +0.00000000000009433962 +0.00000000000009433962 +0.00000000000009433962 +0.00000000000009433962 +0.00000000000009433962 +0.00000000000009433962 +0.00000000000009433962 +0.00000000000009433962 +0.00000000000009433962 +0.00000000000009433962 +0.00000000000009433962 +0.00000000000009433962 +0.00000000000009433962 +0.00000000000009433962 +0.00000000000009433962 +0.00000000000009433962 +0.00000000000009433962 +0.00000000000009433962 +0.00000000000009433962 +0.00000000000009433962 +0.00000000000009433962 +0.00000000000009433962 +0.00000000000009433962 +0.00000000000009433962 diff --git a/testcase/KB/INIT_NWM_KB_FABM_ROSENMCARTUR/TRASH/INIT.depth b/testcase/KB/INIT_NWM_KB_FABM_ROSENMCARTUR/TRASH/INIT.depth new file mode 100644 index 00000000..c50ab8b6 --- /dev/null +++ b/testcase/KB/INIT_NWM_KB_FABM_ROSENMCARTUR/TRASH/INIT.depth @@ -0,0 +1,43 @@ +3.13000000000000000000 +9.76578000000000000000 +17.01680000000000000000 +25.08890000000000000000 +34.14730000000000000000 +44.39130000000000000000 +56.05700000000000000000 +69.42430000000000000000 +84.82570000000000000000 +102.65000000000000000000 +123.35500000000000000000 +147.46800000000000000000 +175.60100000000000000000 +208.44800000000000000000 +246.79400000000000000000 +291.50900000000000000000 +343.54500000000000000000 +403.91700000000000000000 +464.56500000000000000000 +535.20400000000000000000 +613.80500000000000000000 +700.73400000000000000000 +796.25600000000000000000 +900.51600000000000000000 +1013.53000000000000000000 +1135.20000000000000000000 +1265.28000000000000000000 +1403.44000000000000000000 +1549.25000000000000000000 +1702.20000000000000000000 +1861.76000000000000000000 +2027.35000000000000000000 +2198.40000000000000000000 +2374.33000000000000000000 +2554.60000000000000000000 +2738.70000000000000000000 +2926.16000000000000000000 +3116.54000000000000000000 +3309.46000000000000000000 +3504.57000000000000000000 +3701.56000000000000000000 +3900.17000000000000000000 +4100.16259800000000000000 diff --git a/testcase/fabm_rosenmcartur.yaml b/testcase/fabm_rosenmcartur.yaml new file mode 100644 index 00000000..a4dc2bc2 --- /dev/null +++ b/testcase/fabm_rosenmcartur.yaml @@ -0,0 +1,26 @@ +check_conservation: false +require_initialization: true +instances: + P1: + long_name: prey + model: rosenmcartur/prey + parameters: + r: 0.5 + K: 2.6 + initialization: + DW: 1.0 + coupling: + Z1: + long_name: predator + model: rosenmcartur/predator + parameters: + # r: 0.5 + m: 0.15 + e: 0.6 + g: 0.6 + H: 0.6 + # K: 2.6 + initialization: + DWz: 0.1 + coupling: + DW: P1/DW From 1ab45528f698affbc6e213a1e8efea3c348d841b Mon Sep 17 00:00:00 2001 From: Paolo Lazzari Date: Tue, 7 Apr 2026 11:54:24 +0200 Subject: [PATCH 73/97] Add case for RosenMacartur mode --- testcase/create_bc_nc.py | 15 ++++++++++++--- testcase/create_init_nc.py | 17 +++++++++++++++-- testcase/deploy_code.py | 20 +++++++++++++++++++- 3 files changed, 46 insertions(+), 6 deletions(-) diff --git a/testcase/create_bc_nc.py b/testcase/create_bc_nc.py index 0a11586d..5d114b36 100644 --- a/testcase/create_bc_nc.py +++ b/testcase/create_bc_nc.py @@ -75,7 +75,7 @@ def create_bc_nc(test): ncvar = ncOUT.createVariable('reO3c' ,'d',('time','z','y','x') ); ncvar[:] = D3*0.; ncvar = ncOUT.createVariable('reO3h' ,'d',('time','z','y','x') ); ncvar[:] = D3*0.; ncvar = ncOUT.createVariable('reN6r' ,'d',('time','z','y','x') ); ncvar[:] = D3*0.; - elif test['BGC_TYPE'].decode() in ['FABM','fabm']: + elif test['BGC_TYPE'].decode() in ['FABM-BFM','fabm-bfm']: ncvar = ncOUT.createVariable('reN1_p' ,'d',('time','z','y','x') ); ncvar[:] = D3*0.; ncvar = ncOUT.createVariable('reN3_n' ,'d',('time','z','y','x') ); ncvar[:] = D3*0.; ncvar = ncOUT.createVariable('reO2_o' ,'d',('time','z','y','x') ); ncvar[:] = D3*0.; @@ -83,6 +83,9 @@ def create_bc_nc(test): ncvar = ncOUT.createVariable('reO3_c' ,'d',('time','z','y','x') ); ncvar[:] = D3*0.; ncvar = ncOUT.createVariable('reO3h_h' ,'d',('time','z','y','x') ); ncvar[:] = D3*0.; ncvar = ncOUT.createVariable('reN6_r' ,'d',('time','z','y','x') ); ncvar[:] = D3*0.; + elif test['BGC_TYPE'].decode() in ['FABM-ROSENMCARTUR','fabm-rosenmcartur']: + ncvar = ncOUT.createVariable('reP1_DW' ,'d',('time','z','y','x') ); ncvar[:] = D3*0.; + ncvar = ncOUT.createVariable('reZ1_DWz' ,'d',('time','z','y','x') ); ncvar[:] = D3*0.; else: print("BGC_TYPE " + test['BGC_TYPE'].decode() + "wrong/undefined choose within [DEFAULT[Default,default], BFM[bfm], FABM[fabm]]") sys.exit() @@ -132,9 +135,12 @@ def create_bc_nc(test): if test['BGC_TYPE'].decode() in ['DEFAULT','Default','default','BFM','bfm']: ncvar = ncOUT.createVariable('atm_N1p' ,'f',('lat','lon') ); ncvar[:] = 3.75866672509673e-09; ncvar = ncOUT.createVariable('atm_N3n' ,'f',('lat','lon') ); ncvar[:] = 2.24183651189621e-07; - elif test['BGC_TYPE'].decode() in ['FABM','fabm']: + elif test['BGC_TYPE'].decode() in ['FABM-BFM','fabm-bfm']: ncvar = ncOUT.createVariable('atm_N1_p' ,'f',('lat','lon') ); ncvar[:] = 3.75866672509673e-09; ncvar = ncOUT.createVariable('atm_N3_n' ,'f',('lat','lon') ); ncvar[:] = 2.24183651189621e-07; + elif test['BGC_TYPE'].decode() in ['FABM-ROSENMCARTUR','fabm-rosenmcartur']: + ncvar = ncOUT.createVariable('atm_P1_DW' ,'f',('lat','lon') ); ncvar[:] = 0.0; + ncvar = ncOUT.createVariable('atm_Z1_DWz' ,'f',('lat','lon') ); ncvar[:] = 0.0; else: print("BGC_TYPE " + test['BGC_TYPE'].decode() + "wrong/undefined choose within [DEFAULT[Default,default], BFM[bfm], FABM[fabm]]") sys.exit() @@ -225,13 +231,16 @@ def create_bc_nc(test): ncvar = ncOUT.createVariable('riv_O3c' ,'d',('riv_idxt',) ); ncvar[:] = riv_O3c; ncvar = ncOUT.createVariable('riv_O3h' ,'d',('riv_idxt',) ); ncvar[:] = riv_O3h; ncvar = ncOUT.createVariable('riv_O2o' ,'d',('riv_idxt',) ); ncvar[:] = riv_O2o; - elif test['BGC_TYPE'].decode() in ['FABM','fabm']: + elif test['BGC_TYPE'].decode() in ['FABM-BFM','fabm-bfm']: ncvar = ncOUT.createVariable('riv_N1_p' ,'d',('riv_idxt',) ); ncvar[:] = riv_N1p; ncvar = ncOUT.createVariable('riv_N3_n' ,'d',('riv_idxt',) ); ncvar[:] = riv_N3n; ncvar = ncOUT.createVariable('riv_N5_s' ,'d',('riv_idxt',) ); ncvar[:] = riv_N5s; ncvar = ncOUT.createVariable('riv_O3_c' ,'d',('riv_idxt',) ); ncvar[:] = riv_O3c; ncvar = ncOUT.createVariable('riv_O3h_h' ,'d',('riv_idxt',) ); ncvar[:] = riv_O3h; ncvar = ncOUT.createVariable('riv_O2_o' ,'d',('riv_idxt',) ); ncvar[:] = riv_O2o; + elif test['BGC_TYPE'].decode() in ['FABM-ROSENMCARTUR','fabm-rosenmcartur']: + ncvar = ncOUT.createVariable('riv_P1_DW' ,'d',('riv_idxt',) ); ncvar[:] = 0.0; + ncvar = ncOUT.createVariable('riv_Z1_DWz' ,'d',('riv_idxt',) ); ncvar[:] = 0.0; else: print("BGC_TYPE " + test['BGC_TYPE'].decode() + "wrong/undefined choose within [DEFAULT[Default,default], BFM[bfm], FABM[fabm]]") sys.exit() diff --git a/testcase/create_init_nc.py b/testcase/create_init_nc.py index 14c524e8..3cc40630 100644 --- a/testcase/create_init_nc.py +++ b/testcase/create_init_nc.py @@ -24,7 +24,7 @@ def create_init_nc(test): quote_2=line.find("\"",quote_1+1) varname=line[quote_1+1:quote_2] initVARS.append(varname) - elif test['BGC_TYPE'].decode() in ['FABM','fabm']: + elif test['BGC_TYPE'].decode() in ['FABM-BFM','fabm-bfm']: import pyfabm CODEPATH = test['Code'].decode() CODEPATH = CODEPATH.replace("~",os.getenv("HOME")) @@ -34,6 +34,16 @@ def create_init_nc(test): for variable in model.state_variables: print(f" {variable.name} = {variable.long_name} ({variable.units})") initVARS.append(variable.name) + elif test['BGC_TYPE'].decode() in ['FABM-ROSENMCARTUR','fabm-rosenmcartur']: + import pyfabm + CODEPATH = test['Code'].decode() + CODEPATH = CODEPATH.replace("~",os.getenv("HOME")) + fabm_yaml= "fabm_rosenmcartur.yaml " + model = pyfabm.Model(fabm_yaml) + initVARS=[] + for variable in model.state_variables: + print(f" {variable.name} = {variable.long_name} ({variable.units})") + initVARS.append(variable.name) else: print("BGC_TYPE " + test['BGC_TYPE'].decode() + "wrong/undefined choose within [DEFAULT[Default,default], BFM[bfm], FABM[fabm]]") @@ -70,9 +80,12 @@ def create_init_nc(test): if test['BGC_TYPE'].decode() in ['DEFAULT','Default','default','BFM','bfm']: filename = "KB/INIT_NWM_KB/init." + var - elif test['BGC_TYPE'].decode() in ['FABM','fabm']: + elif test['BGC_TYPE'].decode() in ['FABM-BFM','fabm-bfm']: var=var.replace('/','_') filename = "KB/INIT_NWM_KB_FABM/INIT." + var + elif test['BGC_TYPE'].decode() in ['FABM-ROSENMCARTUR','fabm-rosenmcartur']: + var=var.replace('/','_') + filename = "KB/INIT_NWM_KB_FABM_ROSENMCARTUR/INIT." + var else: print("BGC_TYPE " + test['BGC_TYPE'].decode() + "wrong/undefined choose within [DEFAULT[Default,default], BFM[bfm], FABM[fabm]]") sys.exit() diff --git a/testcase/deploy_code.py b/testcase/deploy_code.py index ea3ed54a..651a3ad9 100644 --- a/testcase/deploy_code.py +++ b/testcase/deploy_code.py @@ -37,7 +37,7 @@ def deploy_code(test): namelists= CODEPATH + "/ogstm/ready_for_model_namelists/* " os.system("cp -pf " + namelists + test['Dir'].decode() + "/") - elif test['BGC_TYPE'].decode() in ['FABM','fabm']: + elif test['BGC_TYPE'].decode() in ['FABM-BFM','fabm-bfm']: os.system("cp -pf namelist.init.fabm " + test['Dir'].decode() + "/namelist.init") namelist_optics = CODEPATH + "/ogstm/ready_for_model_namelists/namelist.optics " @@ -49,6 +49,24 @@ def deploy_code(test): fabm_yaml= CODEPATH + "/fabm/extern/ogs/fabm_multispectral_2xDetritus.yaml " os.system("cp -pf " + fabm_yaml + test['Dir'].decode() + "/fabm.yaml") + ret = os.system("cp -pf ogstm.yaml " + test['Dir'].decode() + "/ogstm.yaml") + if ret != 0: + print("ogstm.yaml not found, creating template...") + os.system("python create_ogstm_yaml.py") + os.system("cp -pf ogstm.yaml " + test['Dir'].decode() + "/ogstm.yaml") + + elif test['BGC_TYPE'].decode() in ['FABM-ROSENMCARTUR','fabm-rosenmcartur']: + os.system("cp -pf namelist.init.fabm " + test['Dir'].decode() + "/namelist.init") + + namelist_optics = CODEPATH + "/ogstm/ready_for_model_namelists/namelist.optics " + os.system("cp -pf " + namelist_optics + test['Dir'].decode() + "/") + + namelist_phys = CODEPATH + "/ogstm/ready_for_model_namelists/namelist.phys " + os.system("cp -pf " + namelist_phys + test['Dir'].decode() + "/") + + fabm_yaml= "fabm_rosenmcartur.yaml " + os.system("cp -pf " + fabm_yaml + test['Dir'].decode() + "/fabm.yaml") + ret = os.system("cp -pf ogstm.yaml " + test['Dir'].decode() + "/ogstm.yaml") if ret != 0: print("ogstm.yaml not found, creating template...") From 4a375ed8d1ae336702a215f8f0ec2d8da1fba65c Mon Sep 17 00:00:00 2001 From: Paolo Lazzari Date: Tue, 7 Apr 2026 11:55:41 +0200 Subject: [PATCH 74/97] Add GUI for ogstm.yaml file configuration --- testcase/create_ogstm_yaml_V2.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/testcase/create_ogstm_yaml_V2.py b/testcase/create_ogstm_yaml_V2.py index 7e699ef1..1f660f00 100644 --- a/testcase/create_ogstm_yaml_V2.py +++ b/testcase/create_ogstm_yaml_V2.py @@ -5,8 +5,8 @@ CODEPATH = '../../' CODEPATH = CODEPATH.replace("~", os.getenv("HOME")) -fabm_yaml = CODEPATH + "/fabm/extern/ogs/fabm_multispectral_2xDetritus.yaml" - +#fabm_yaml = CODEPATH + "/fabm/extern/ogs/fabm_multispectral_2xDetritus.yaml" +fabm_yaml = "fabm_rosenmcartur.yaml" class OGSTMYAMLGenerator: def __init__(self, root): self.root = root From 35fe76f27f20ead3c04554c4d59561d141de7a47 Mon Sep 17 00:00:00 2001 From: Paolo Lazzari Date: Wed, 15 Apr 2026 11:42:02 +0200 Subject: [PATCH 75/97] extension of variable name strings for output files to 200 digits, bug fix of diadump when high freq not active random output values. --- src/BC/closed.f90 | 6 ++-- src/BC/hard_open.f90 | 6 ++-- src/BC/nudging.f90 | 6 ++-- src/BC/rivers.f90 | 6 ++-- src/BC/sponge.f90 | 6 ++-- src/BIO-OPTICS/trc3streams.f90 | 2 +- src/DA/trcwri_DA.f90 | 4 +-- src/General/memory.f90 | 14 +++++----- src/IO/Ed_dump.f90 | 8 +++--- src/IO/Es_dump.f90 | 8 +++--- src/IO/Eu_dump.f90 | 8 +++--- src/IO/IOnc.f90 | 8 +++--- src/IO/diadump.f90 | 40 ++++++++++----------------- src/IO/trcdit.f90 | 8 +++--- src/IO/trcwri.f90 | 4 +-- src/MPI/dtype_procs_string_module.f90 | 2 +- 16 files changed, 63 insertions(+), 73 deletions(-) diff --git a/src/BC/closed.f90 b/src/BC/closed.f90 index 513d5039..d0bf4fe2 100644 --- a/src/BC/closed.f90 +++ b/src/BC/closed.f90 @@ -15,8 +15,8 @@ module closed_mod ! TO DO: review names character(len=3) :: m_name ! ex: 'gib' integer :: m_n_vars ! BC_mem.f90:94 - character(len=20), allocatable, dimension(:) :: m_var_names ! domrea.f90:161-167 - character(len=20), allocatable, dimension(:) :: m_var_names_data ! bc_gib.f90:113 + character(len=200), allocatable, dimension(:) :: m_var_names ! domrea.f90:161-167 + character(len=200), allocatable, dimension(:) :: m_var_names_data ! bc_gib.f90:113 integer(4), allocatable, dimension(:) :: m_var_names_idx ! tra_matrix_gib double precision, allocatable, dimension(:, :, :) :: m_buffer ! replaces m_aux, now it is a 3D matrix integer(4) :: m_size ! BC_mem.f90:21 @@ -146,7 +146,7 @@ subroutine init_members(self, bc_name, namelist_file) character(len=7), intent(in) :: namelist_file integer :: n_vars - character(len=20), allocatable, dimension(:) :: vars + character(len=200), allocatable, dimension(:) :: vars integer(4), allocatable, dimension(:) :: var_names_idx double precision :: alpha double precision :: reduction_value_t diff --git a/src/BC/hard_open.f90 b/src/BC/hard_open.f90 index 1122b3b6..f01fd245 100644 --- a/src/BC/hard_open.f90 +++ b/src/BC/hard_open.f90 @@ -13,8 +13,8 @@ module hard_open_mod character(len=3) :: m_name ! ex: 'ope' integer :: m_n_vars - character(len=20), allocatable, dimension(:) :: m_var_names - character(len=20), allocatable, dimension(:) :: m_var_names_data + character(len=200), allocatable, dimension(:) :: m_var_names + character(len=200), allocatable, dimension(:) :: m_var_names_data integer(4), allocatable, dimension(:) :: m_var_names_idx integer :: m_n_missing_vars integer(4), allocatable, dimension(:) :: m_missing_var_names_idx @@ -228,7 +228,7 @@ subroutine init_members(self, bc_name, namelist_file, n_tracers) integer, intent(in) :: n_tracers integer :: n_vars - character(len=20), allocatable, dimension(:) :: vars + character(len=200), allocatable, dimension(:) :: vars integer(4) :: geometry double precision :: damping_coeff integer, parameter :: file_unit = 101 ! 100 for data files, 101 for boundary namelist files diff --git a/src/BC/nudging.f90 b/src/BC/nudging.f90 index 8fddad75..32618305 100644 --- a/src/BC/nudging.f90 +++ b/src/BC/nudging.f90 @@ -23,8 +23,8 @@ module nudging_mod class(bc), pointer :: m_bc_no_nudging => null() character(len=11) :: m_data_file ! 11 chars in order to handle names like 'bounmask.nc' integer :: m_n_nudging_vars - character(len=20), allocatable, dimension(:) :: m_nudging_vars - character(len=20), allocatable, dimension(:) :: m_nudging_vars_rst + character(len=200), allocatable, dimension(:) :: m_nudging_vars + character(len=200), allocatable, dimension(:) :: m_nudging_vars_rst integer(4), allocatable, dimension(:) :: m_nudging_vars_idx ! tra_matrix_gib double precision, allocatable, dimension(:, :, :, :) :: m_rst ! resto double precision, allocatable, dimension(:) :: m_rst_corr ! restocorr @@ -79,7 +79,7 @@ subroutine init_members(self, bc_no_nudging, namelist_file, n_tracers) integer :: n_vars character(len=11) :: data_file ! 11 chars in order to handle names like 'bounmask.nc' - character(len=20), allocatable, dimension(:) :: vars + character(len=200), allocatable, dimension(:) :: vars double precision, allocatable, dimension(:) :: rst_corr integer, parameter :: file_unit = 101 ! 100 for data files, 101 for boundary namelist files diff --git a/src/BC/rivers.f90 b/src/BC/rivers.f90 index 53808e9b..7b99672f 100644 --- a/src/BC/rivers.f90 +++ b/src/BC/rivers.f90 @@ -19,8 +19,8 @@ module rivers_mod ! TO DO: review names character(len=3) :: m_name ! ex: 'riv' integer :: m_n_vars ! BC_mem.f90:95 - character(len=20), allocatable, dimension(:) :: m_var_names - character(len=20), allocatable, dimension(:) :: m_var_names_data ! bc_tin.f90:116 + character(len=200), allocatable, dimension(:) :: m_var_names + character(len=200), allocatable, dimension(:) :: m_var_names_data ! bc_tin.f90:116 integer(4), allocatable, dimension(:) :: m_var_names_idx ! tra_matrix_riv double precision, allocatable, dimension(:, :) :: m_buffer ! replaces m_aux, now it is a 2D matrix integer(4) :: m_size @@ -139,7 +139,7 @@ subroutine init_members(self, bc_name, namelist_file) character(len=7), intent(in) :: namelist_file integer :: n_vars - character(len=20), allocatable, dimension(:) :: vars + character(len=200), allocatable, dimension(:) :: vars integer, parameter :: file_unit = 101 ! 100 for data files, 101 for boundary namelist files integer :: i namelist /vars_dimension/ n_vars diff --git a/src/BC/sponge.f90 b/src/BC/sponge.f90 index a912bf5c..e1a58207 100644 --- a/src/BC/sponge.f90 +++ b/src/BC/sponge.f90 @@ -18,8 +18,8 @@ module sponge_mod ! TO DO: review names character(len=3) :: m_name ! ex: 'gib' integer :: m_n_vars ! BC_mem.f90:94 - character(len=20), allocatable, dimension(:) :: m_var_names ! domrea.f90:161-167 - character(len=20), allocatable, dimension(:) :: m_var_names_data ! bc_gib.f90:113 + character(len=200), allocatable, dimension(:) :: m_var_names ! domrea.f90:161-167 + character(len=200), allocatable, dimension(:) :: m_var_names_data ! bc_gib.f90:113 integer(4), allocatable, dimension(:) :: m_var_names_idx ! tra_matrix_gib double precision, allocatable, dimension(:, :, :) :: m_buffer ! replaces m_aux, now it is a 3D matrix integer(4) :: m_size ! BC_mem.f90:21 @@ -149,7 +149,7 @@ subroutine init_members(self, bc_name, namelist_file) character(len=7), intent(in) :: namelist_file integer :: n_vars - character(len=20), allocatable, dimension(:) :: vars + character(len=200), allocatable, dimension(:) :: vars double precision :: alpha double precision :: reduction_value_t double precision :: length diff --git a/src/BIO-OPTICS/trc3streams.f90 b/src/BIO-OPTICS/trc3streams.f90 index c6435083..59348690 100644 --- a/src/BIO-OPTICS/trc3streams.f90 +++ b/src/BIO-OPTICS/trc3streams.f90 @@ -24,7 +24,7 @@ SUBROUTINE trc3streams(datestring) INTEGER :: MODE ! 0-exact, 1-approx INTEGER :: year, month, day, ihr INTEGER :: it_actual - CHARACTER(LEN=20) :: V_POSITION + CHARACTER(LEN=200) :: V_POSITION double precision :: solz(jpj,jpi), rmud(jpj,jpi) double precision :: Edz(jpk,nlt),Esz(jpk,nlt),Euz(jpk,nlt) double precision, allocatable:: E(:,:,:) !(3,jpk+1,nlt) diff --git a/src/DA/trcwri_DA.f90 b/src/DA/trcwri_DA.f90 index 658b4808..6ade162b 100644 --- a/src/DA/trcwri_DA.f90 +++ b/src/DA/trcwri_DA.f90 @@ -58,7 +58,7 @@ SUBROUTINE trcwriDA(datestring) INTEGER ind1, i_contribution, j_contribution INTEGER SysErr, system INTEGER :: jv,n_dumping_cycles,writing_rank,counter_var_DA,ivar,jn_da,ind_col - CHARACTER(LEN=20) var_to_store + CHARACTER(LEN=200) var_to_store julian=datestring2sec(datestring) @@ -210,7 +210,7 @@ SUBROUTINE CHL_subroutine(datestring) INTEGER ind1, i_contribution, j_contribution INTEGER SysErr, system INTEGER ::jv,n_dumping_cycles,writing_rank,counter_var_DA,ivar,jn_da,ind_col - CHARACTER(LEN=20) var_to_store + CHARACTER(LEN=200) var_to_store julian=datestring2sec(datestring) buf = Miss_val diff --git a/src/General/memory.f90 b/src/General/memory.f90 index 9fd320be..6bb3b4d0 100644 --- a/src/General/memory.f90 +++ b/src/General/memory.f90 @@ -274,21 +274,21 @@ MODULE myalloc !! PASSIVE TRACER MODEL - CHARACTER(LEN=20), allocatable, dimension(:) :: ctrcnm!(jptra) + CHARACTER(LEN=200), allocatable, dimension(:) :: ctrcnm!(jptra) CHARACTER(LEN=12), allocatable, dimension(:) :: ctrcun!(jptra) - CHARACTER(LEN=20), allocatable, dimension(:) :: dianm!(jptra_dia) - CHARACTER(LEN=20), allocatable, dimension(:) :: diaun!(jptra_dia) + CHARACTER(LEN=200), allocatable, dimension(:) :: dianm!(jptra_dia) + CHARACTER(LEN=200), allocatable, dimension(:) :: diaun!(jptra_dia) INTEGER , allocatable, dimension(:) :: diahf!(jptra_dia) INTEGER , allocatable, dimension(:) :: diaWR!(jptra_dia) - CHARACTER(LEN=20), allocatable, dimension(:) :: dianm_2d!(jptra_dia_2d) - CHARACTER(LEN=20), allocatable, dimension(:) :: diaun_2d!(jptra_dia_2d) + CHARACTER(LEN=200), allocatable, dimension(:) :: dianm_2d!(jptra_dia_2d) + CHARACTER(LEN=200), allocatable, dimension(:) :: diaun_2d!(jptra_dia_2d) INTEGER , allocatable, dimension(:) :: diahf_2d!(jptra_dia_2d) INTEGER , allocatable, dimension(:) :: diaWR_2d!(jptra_dia_2d) CHARACTER(LEN=17) :: COMMON_DATESTRING !physical tracers INTEGER :: jptra_phys, jptra_phys_2d INTEGER :: freq_ave_phys - CHARACTER(LEN=20), allocatable, dimension(:) :: physnm, physun, physnm_2d, physun_2d + CHARACTER(LEN=200), allocatable, dimension(:) :: physnm, physun, physnm_2d, physun_2d INTEGER, allocatable, dimension(:) :: physWR,physWR_2d @@ -1109,7 +1109,7 @@ INTEGER FUNCTION find_index_var(string) ! finds string in statevars ! IMPLICIT NONE - character(LEN=20), INTENT(IN) :: string + character(LEN=200), INTENT(IN) :: string integer jn find_index_var=0 diff --git a/src/IO/Ed_dump.f90 b/src/IO/Ed_dump.f90 index 29d22d8e..fa32ede9 100644 --- a/src/IO/Ed_dump.f90 +++ b/src/IO/Ed_dump.f90 @@ -39,15 +39,15 @@ SUBROUTINE Ed_dump(datemean,datefrom,dateTo) !new declarations INTEGER counter_var, ind_var, nVARS, jv, ivar, n_dumping_cycles INTEGER col_var, row_var, writing_rank - CHARACTER(len=20), DIMENSION(nodes) :: matrix_row_to_write + CHARACTER(len=200), DIMENSION(nodes) :: matrix_row_to_write - CHARACTER(LEN=56) output_file_nc ! AVE_FREQ_1/ave.20091231-12:00:00.P1n.nc - CHARACTER(LEN=20) var + CHARACTER(LEN=300) output_file_nc ! AVE_FREQ_1/ave.20091231-12:00:00.P1n.nc + CHARACTER(LEN=200) var CHARACTER(LEN=60) bkpname CHARACTER(LEN=11) DIR logical IsBackup - CHARACTER(LEN=20) var_to_store + CHARACTER(LEN=200) var_to_store INTEGER :: ind_col DOUBLE PRECISION :: start_time_trcdit_info,finish_time_trcdit_info, proctime_time_trcdit_info, max_time_trcdit_info diff --git a/src/IO/Es_dump.f90 b/src/IO/Es_dump.f90 index 78bbfaf8..b6c15ad2 100644 --- a/src/IO/Es_dump.f90 +++ b/src/IO/Es_dump.f90 @@ -39,15 +39,15 @@ SUBROUTINE Es_dump(datemean,datefrom,dateTo) !new declarations INTEGER counter_var, ind_var, nVARS, jv, ivar, n_dumping_cycles INTEGER col_var, row_var, writing_rank - CHARACTER(len=20), DIMENSION(nodes) :: matrix_row_to_write + CHARACTER(len=200), DIMENSION(nodes) :: matrix_row_to_write - CHARACTER(LEN=56) output_file_nc ! AVE_FREQ_1/ave.20091231-12:00:00.P1n.nc - CHARACTER(LEN=20) var + CHARACTER(LEN=300) output_file_nc ! AVE_FREQ_1/ave.20091231-12:00:00.P1n.nc + CHARACTER(LEN=200) var CHARACTER(LEN=60) bkpname CHARACTER(LEN=11) DIR logical IsBackup - CHARACTER(LEN=20) var_to_store + CHARACTER(LEN=200) var_to_store INTEGER :: ind_col DOUBLE PRECISION :: start_time_trcdit_info,finish_time_trcdit_info, proctime_time_trcdit_info, max_time_trcdit_info diff --git a/src/IO/Eu_dump.f90 b/src/IO/Eu_dump.f90 index d3a7f638..81481891 100644 --- a/src/IO/Eu_dump.f90 +++ b/src/IO/Eu_dump.f90 @@ -38,15 +38,15 @@ SUBROUTINE Eu_dump(datemean,datefrom,dateTo) !new declarations INTEGER counter_var, ind_var, nVARS, jv, ivar, n_dumping_cycles INTEGER col_var, row_var, writing_rank - CHARACTER(len=20), DIMENSION(nodes) :: matrix_row_to_write + CHARACTER(len=200), DIMENSION(nodes) :: matrix_row_to_write - CHARACTER(LEN=56) output_file_nc ! AVE_FREQ_1/ave.20091231-12:00:00.P1n.nc - CHARACTER(LEN=20) var + CHARACTER(LEN=300) output_file_nc ! AVE_FREQ_1/ave.20091231-12:00:00.P1n.nc + CHARACTER(LEN=200) var CHARACTER(LEN=60) bkpname CHARACTER(LEN=11) DIR logical IsBackup - CHARACTER(LEN=20) var_to_store + CHARACTER(LEN=200) var_to_store INTEGER :: ind_col DOUBLE PRECISION :: start_time_trcdit_info,finish_time_trcdit_info, proctime_time_trcdit_info, max_time_trcdit_info diff --git a/src/IO/IOnc.f90 b/src/IO/IOnc.f90 index ed0e2f6e..176477cf 100644 --- a/src/IO/IOnc.f90 +++ b/src/IO/IOnc.f90 @@ -657,7 +657,7 @@ SUBROUTINE WRITE_AVE(fileNetCDF,VAR, datefrom, dateTo,M,deflate, deflate_level) IMPLICIT NONE CHARACTER*(*),intent(in) :: fileNetCDF - character(LEN=20),intent(in) :: VAR + character(LEN=200),intent(in) :: VAR character(LEN=17),intent(in) :: datefrom, dateTo double precision, dimension(jpk, jpjglo, jpiglo),intent(in) :: M integer, intent(in) :: deflate, deflate_level @@ -775,7 +775,7 @@ SUBROUTINE WRITE_AVE_2D(fileNetCDF,VAR, datefrom, dateTo,M) character(LEN=17),intent(in) :: datefrom, dateTo real,intent(in),dimension(jpjglo, jpiglo) :: M - character(LEN=20) :: VAR + character(LEN=200) :: VAR integer :: istart,iend integer :: s, nc, counter @@ -843,7 +843,7 @@ SUBROUTINE WRITE_AVE_BKP(fileNetCDF, VAR,datefrom, dateTo,M, elapsed_time, defla IMPLICIT NONE CHARACTER*(*),intent(in) :: fileNetCDF - character(LEN=20), intent(in):: VAR + character(LEN=200), intent(in):: VAR character(LEN=17),intent(in) :: datefrom, dateTo double precision,dimension(jpk, jpjglo, jpiglo),intent(in) :: M double precision,intent(in) :: elapsed_time @@ -936,7 +936,7 @@ SUBROUTINE WRITE_AVE_2d_BKP(fileNetCDF,VAR, datefrom, dateTo,M, elapsed_time) double precision,intent(in) :: elapsed_time !local - character(LEN=20) VAR + character(LEN=200) VAR integer istart,iend integer s, nc, counter diff --git a/src/IO/diadump.f90 b/src/IO/diadump.f90 index 7bd880db..a87d9d5e 100644 --- a/src/IO/diadump.f90 +++ b/src/IO/diadump.f90 @@ -28,9 +28,9 @@ SUBROUTINE diadump(datemean,datefrom,dateTo,FREQ_GROUP) double precision :: elapsed_time - CHARACTER(LEN=56) dia_file_nc - CHARACTER(LEN=56) phys_file_nc - CHARACTER(LEN=20) var + CHARACTER(LEN=300) dia_file_nc + CHARACTER(LEN=300) phys_file_nc + CHARACTER(LEN=200) var INTEGER idrank, ierr, istart, jstart, iPe, iPd, jPe, jPd, status(MPI_STATUS_SIZE) INTEGER irange, jrange @@ -39,8 +39,8 @@ SUBROUTINE diadump(datemean,datefrom,dateTo,FREQ_GROUP) double precision :: Miss_val =1.e20 INTEGER :: nVars, counter_var_2d, counter_var_high_2d,counter_var_diag, counter_var_diag_high INTEGER :: counter_var_phys_2d,counter_var_phys_high_2d,counter_var_phys, counter_var_phys_high - CHARACTER(LEN=20) :: var_to_store_diag_2d, var_to_store_diag - CHARACTER(LEN=20) :: var_to_store_phys_2d, var_to_store_phys + CHARACTER(LEN=200) :: var_to_store_diag_2d, var_to_store_diag + CHARACTER(LEN=200) :: var_to_store_phys_2d, var_to_store_phys INTEGER :: n_dumping_cycles, jv, ivar, writing_rank, ind_col INTEGER :: var_to_send_2D, var_high_to_send_2D INTEGER :: var_to_send, var_high_to_send @@ -70,7 +70,6 @@ SUBROUTINE diadump(datemean,datefrom,dateTo,FREQ_GROUP) COUNTER_VAR_2d = 1 COUNTER_VAR_HIGH_2d = 1 - DUMPING_LOOP_2d: DO jv = 1, n_dumping_cycles DO ivar = 1 , nodes @@ -78,9 +77,9 @@ SUBROUTINE diadump(datemean,datefrom,dateTo,FREQ_GROUP) writing_rank = writing_procs(ivar) - IF (COUNTER_VAR_2d > JPTRA_dia_2d_wri)then + IF ( (COUNTER_VAR_2d > JPTRA_dia_2d_wri) .AND. (FREQ_GROUP==2) ) then EXIT - else if (COUNTER_VAR_HIGH_2d > JPTRA_dia_2d_HIGH_wri)then + else if ( (COUNTER_VAR_HIGH_2d > JPTRA_dia_2d_HIGH_wri) .AND. (FREQ_GROUP==1) ) then EXIT ELSE @@ -161,8 +160,7 @@ SUBROUTINE diadump(datemean,datefrom,dateTo,FREQ_GROUP) enddo enddo enddo - !if (FREQ_GROUP.eq.2)write(*,*) 'CHECK ', var_to_store_diag_2d,var_to_send_2d - !if (FREQ_GROUP.eq.1) write(*,*)'CHECK_h', var_to_store_diag_2d, COUNTER_VAR_HIGH_2d + bkpname = DIR//'ave.'//datemean//'.'//trim(var_to_store_diag_2d)//'.nc.bkp' dia_file_nc = DIR//'ave.'//datemean//'.'//trim(var_to_store_diag_2d)//'.nc' @@ -178,6 +176,8 @@ SUBROUTINE diadump(datemean,datefrom,dateTo,FREQ_GROUP) end if END IF END DO DUMPING_LOOP_2d + flush(UNIT=6) +! STOP #ifdef key_trc_bfm if (.not.IsBackup) then @@ -234,9 +234,9 @@ SUBROUTINE diadump(datemean,datefrom,dateTo,FREQ_GROUP) writing_rank = writing_procs(ivar) - IF (COUNTER_VAR_diag > JPTRA_dia_wri)then + IF ( (COUNTER_VAR_diag > JPTRA_dia_wri) .AND. (FREQ_GROUP==2) ) then EXIT - else if (COUNTER_VAR_diag_HIGH > JPTRA_dia_HIGH_wri)then + else if ( (COUNTER_VAR_diag_HIGH > JPTRA_dia_HIGH_wri) .AND. (FREQ_GROUP==1) ) then EXIT ELSE var_to_send = lowfreq_table_dia_wri(counter_var_diag) @@ -269,15 +269,13 @@ SUBROUTINE diadump(datemean,datefrom,dateTo,FREQ_GROUP) buffDIA(ind) = tra_DIA_IO_HIGH(COUNTER_VAR_diag_HIGH, jk,jj,ji) #endif #ifdef key_trc_fabm - write(*,*) 'CHECK_h_before', COUNTER_VAR_diag_HIGH - write(*,*) 'CHECK_h_before var_to_send', tra_DIA_IO_HIGH(COUNTER_VAR_diag_HIGH)%data(jk,jj,ji) + buffDIA(ind) = tra_DIA_IO_HIGH(COUNTER_VAR_diag_HIGH)%data(jk,jj,ji) #endif enddo enddo enddo end if - !if (FREQ_GROUP.eq.1)write(*,*)'CHECK_h_before', COUNTER_VAR_diag_HIGH counter_var_diag = counter_var_diag + 1 if (FREQ_GROUP.eq.1) counter_var_diag_high = counter_var_diag_high + 1 @@ -326,8 +324,7 @@ SUBROUTINE diadump(datemean,datefrom,dateTo,FREQ_GROUP) enddo enddo enddo - !if (FREQ_GROUP.eq.2)write(*,*) 'CHECK ', var_to_store_diag, var_to_send - !if (FREQ_GROUP.eq.1)write(*,*) 'CHECK_h', var_to_store_diag, COUNTER_VAR_diag_HIGH + bkpname = DIR//'ave.'//datemean//'.'//trim(var_to_store_diag)//'.nc.bkp' dia_file_nc = DIR//'ave.'//datemean//'.'//trim(var_to_store_diag)//'.nc' @@ -379,12 +376,10 @@ SUBROUTINE diadump(datemean,datefrom,dateTo,FREQ_GROUP) tra_PHYS_2d_IO(1,:,:) = vatmIO tra_PHYS_2d_IO(2,:,:) = empIO tra_PHYS_2d_IO(3,:,:) = qsrIO - tra_PHYS_2d_IO_high(1,:,:) = vatmIO tra_PHYS_2d_IO_high(2,:,:) = empIO - !write(*,*) 'copy is',tra_PHYS_2d_IO_high(2,5,5) tra_PHYS_2d_IO_high(3,:,:) = qsrIO - !write(*,*) 'copy is',tra_PHYS_2d_IO_high(3,5,5) + IF (freq_ave_phys==1)then @@ -410,7 +405,6 @@ SUBROUTINE diadump(datemean,datefrom,dateTo,FREQ_GROUP) writing_rank = writing_procs(ivar) - !write(*,*)'phys 2d wri number' ,JPTRA_phys_2d_HIGH_wri IF (freq_ave_phys==2 .and. COUNTER_VAR_phys_2d > JPTRA_phys_2d_wri)then EXIT else if (freq_ave_phys==1 .and. COUNTER_VAR_phys_HIGH_2d > JPTRA_phys_2d_HIGH_wri)then @@ -420,7 +414,6 @@ SUBROUTINE diadump(datemean,datefrom,dateTo,FREQ_GROUP) var_to_send_2D = lowfreq_table_phys_2d_wri(counter_var_phys_2d) else var_to_send_2D = highfreq_table_phys_2d_wri(counter_var_phys_high_2d) - !write(*,*) 'var to send 2d is', var_to_send_2D end if if (freq_ave_phys.eq.2) then @@ -439,9 +432,6 @@ SUBROUTINE diadump(datemean,datefrom,dateTo,FREQ_GROUP) buffPHYS2d (ind)=tra_PHYS_2d_IO_high(var_to_send_2D,jj,ji) enddo enddo - !write(*,*) 'valeu in buffer is', tra_PHYS_2d_IO_high(var_to_send_2D,5,5) - !write(*,*) & - !'valeu in buffer is,second print',tra_PHYS_2d_IO_high(3,5,5) endif counter_var_phys_2d = counter_var_phys_2d + 1 if (freq_ave_phys.eq.1) counter_var_phys_high_2d = counter_var_phys_high_2d + 1 diff --git a/src/IO/trcdit.f90 b/src/IO/trcdit.f90 index 25156e40..46c62f57 100644 --- a/src/IO/trcdit.f90 +++ b/src/IO/trcdit.f90 @@ -40,15 +40,15 @@ SUBROUTINE trcdit(datemean,datefrom,dateTo,FREQ_GROUP) !new declarations INTEGER counter_var, counter_var_high, new_counter_var, new_counter_var_high, nVARS, jv, ivar, n_dumping_cycles INTEGER col_var, row_var, writing_rank - CHARACTER(len=20), DIMENSION(nodes) :: matrix_row_to_write + CHARACTER(len=200), DIMENSION(nodes) :: matrix_row_to_write - CHARACTER(LEN=56) output_file_nc ! AVE_FREQ_1/ave.20091231-12:00:00.P1n.nc - CHARACTER(LEN=20) var + CHARACTER(LEN=300) output_file_nc ! AVE_FREQ_1/ave.20091231-12:00:00.P1n.nc + CHARACTER(LEN=200) var CHARACTER(LEN=60) bkpname CHARACTER(LEN=11) DIR logical IsBackup - CHARACTER(LEN=20) var_to_store + CHARACTER(LEN=200) var_to_store INTEGER :: ind_col DOUBLE PRECISION :: start_time_trcdit_info,finish_time_trcdit_info, proctime_time_trcdit_info, max_time_trcdit_info diff --git a/src/IO/trcwri.f90 b/src/IO/trcwri.f90 index b8bc35d2..10de87fc 100644 --- a/src/IO/trcwri.f90 +++ b/src/IO/trcwri.f90 @@ -28,14 +28,14 @@ SUBROUTINE trcwri(datestring) CHARACTER(LEN=100) filename - CHARACTER(LEN=20) varname + CHARACTER(LEN=200) varname INTEGER idrank, ierr, istart, jstart, iPe, iPd, jPe, jPd, status(MPI_STATUS_SIZE) INTEGER irange, jrange INTEGER totistart, totiend, relistart, reliend INTEGER totjstart, totjend, reljstart, reljend INTEGER ind1, i_contribution, j_contribution - CHARACTER(LEN=20) var_to_store + CHARACTER(LEN=200) var_to_store INTEGER :: COUNTER_VAR_TRCWRI, n_dumping_cycles, jv, ivar, writing_rank, ind_col filename = 'RST.20111231-15:30:00.N1p.nc' diff --git a/src/MPI/dtype_procs_string_module.f90 b/src/MPI/dtype_procs_string_module.f90 index fdc673c8..cbde53b8 100644 --- a/src/MPI/dtype_procs_string_module.f90 +++ b/src/MPI/dtype_procs_string_module.f90 @@ -1,6 +1,6 @@ module dtype_procs_string_module TYPE processor_string - CHARACTER (LEN = 20) :: var_name + CHARACTER (LEN = 200) :: var_name integer :: var_index END TYPE processor_string end module dtype_procs_string_module From c96f0cb9710708123653e08c2f2ae680eb2379c8 Mon Sep 17 00:00:00 2001 From: Paolo Lazzari Date: Wed, 15 Apr 2026 11:45:12 +0200 Subject: [PATCH 76/97] bug fix for function DAY_OF_THE_YEAR --- src/General/TimeManager.f90 | 26 +++++++++++++++++++++----- 1 file changed, 21 insertions(+), 5 deletions(-) diff --git a/src/General/TimeManager.f90 b/src/General/TimeManager.f90 index fc8ade93..f9e25fbe 100644 --- a/src/General/TimeManager.f90 +++ b/src/General/TimeManager.f90 @@ -832,17 +832,33 @@ END FUNCTION SEC_FROM_START double precision FUNCTION DAY_OF_THE_YEAR(datestring) IMPLICIT NONE CHARACTER(LEN=17), INTENT(IN) :: datestring - integer year, month, day + integer year, month, day, i INTEGER, PARAMETER :: mon_len(12)=(/31,28,31,30,31,30,31,31,30,31,30,31/) double precision sec + integer days_before, feb_days call read_date_string(datestring, year, month, day, sec) - if (month ==1) then - DAY_OF_THE_YEAR = REAL(day-1, 8) + sec/86400.0 - else - DAY_OF_THE_YEAR = REAL(mon_len(month-1),8) + REAL(day-1, 8) + sec/86400.0 + + ! Check if it's a leap year and adjust February days + feb_days = mon_len(2) ! 28 + if (mod(year,4) == 0) then + if (mod(year,100) /= 0 .or. mod(year,400) == 0) then + feb_days = 29 + endif endif + ! Sum all days from months before the current month + days_before = 0 + do i = 1, month-1 + if (i == 2) then + days_before = days_before + feb_days + else + days_before = days_before + mon_len(i) + endif + end do + + DAY_OF_THE_YEAR = REAL(days_before, 8) + REAL(day-1, 8) + sec/86400.0 + END FUNCTION DAY_OF_THE_YEAR From 176b4e6fe5d42ebc7092766943342924923435f0 Mon Sep 17 00:00:00 2001 From: Paolo Lazzari Date: Wed, 15 Apr 2026 11:53:36 +0200 Subject: [PATCH 77/97] added different options for var_nc definition of Restoration Mask, this part will be removed, see issue in GitHub --- src/IO/domrea.f90 | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/IO/domrea.f90 b/src/IO/domrea.f90 index 2b08be42..cb0f6a9b 100644 --- a/src/IO/domrea.f90 +++ b/src/IO/domrea.f90 @@ -217,12 +217,9 @@ SUBROUTINE domrea var_nc(4) = 'N5_s' var_nc(5) = 'O3_c' var_nc(6) = 'O3h_h' - #else - ! Default dimensions are included within the file DEFAULT_var_list.h var_nc(1) = 'O2o' - #endif From ffb9094b657c1841449c28a3a8f811581c474b8d Mon Sep 17 00:00:00 2001 From: Paolo Lazzari Date: Wed, 15 Apr 2026 11:57:46 +0200 Subject: [PATCH 78/97] Removed write for debug phase --- src/PHYS/trcave_fabm.f90 | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/PHYS/trcave_fabm.f90 b/src/PHYS/trcave_fabm.f90 index 274cc8a7..bc29cc28 100644 --- a/src/PHYS/trcave_fabm.f90 +++ b/src/PHYS/trcave_fabm.f90 @@ -172,6 +172,7 @@ SUBROUTINE trcave_fabm(datestring) ENDIF END DO END DO + ENDIF END DO @@ -188,8 +189,6 @@ SUBROUTINE trcave_fabm(datestring) DO jk=1, jpk DO jn_high=1, jptra_dia_high jn_on_all = highfreq_table_dia(jn_high ) - write(*,*) 'jn_on_all', jn_on_all - write(*,*) 'jn_high', jn_high IF (model_fabm%interior_diagnostic_variables(jn_on_all)%save) THEN IF(tmask(jk,jj,ji) .NE. 0.) THEN @@ -199,8 +198,7 @@ SUBROUTINE trcave_fabm(datestring) tra_DIA_IO_HIGH(jn_high)%data(jk,jj,ji)=Miss_val ENDIF ENDIF - write(*,*) 'tra_DIA_IO_HIGH', tra_DIA_IO_HIGH(jn_high)%data(jk,jj,ji) - write(*,*) 'tra_DIA', tra_DIA(jn_on_all)%data(jk,jj,ji) + END DO END DO END DO From 6b81ae6a772571626f06c1b8e53acd493cb58009 Mon Sep 17 00:00:00 2001 From: Paolo Lazzari Date: Wed, 15 Apr 2026 12:12:28 +0200 Subject: [PATCH 79/97] set aerosol_air_mass_type from 10 - continental - to 1 - open ocean - --- src/BIO/BIO_mem.f90 | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/BIO/BIO_mem.f90 b/src/BIO/BIO_mem.f90 index 6d3c5d9f..e92b47d3 100644 --- a/src/BIO/BIO_mem.f90 +++ b/src/BIO/BIO_mem.f90 @@ -128,9 +128,7 @@ subroutine myalloc_BIO() ! For this list, visit https://fabm.net/standard_variables call model_fabm%link_interior_data(fabm_standard_variables%temperature, tn) ! Celsius - write(*,*) 'tn', tn call model_fabm%link_interior_data(fabm_standard_variables%practical_salinity, sn) ! PSU - write(*,*) 'sn', sn call model_fabm%link_interior_data(fabm_standard_variables%density, rho) ! kg m-3 call model_fabm%link_interior_data(fabm_standard_variables%pressure, gdept) ! dbar call model_fabm%link_horizontal_data(fabm_standard_variables%mole_fraction_of_carbon_dioxide_in_air, ogstm_co2) ! CO2 Mixing Ratios (ppm) @@ -162,7 +160,7 @@ subroutine myalloc_BIO() call model_fabm%link_horizontal_data(horizontal_id, visibility_in_air) ! m horizontal_id = model_fabm%get_horizontal_variable_id('aerosol_air_mass_type') - aerosol_air_mass_type = 10.d0 + aerosol_air_mass_type = 1.d0 call model_fabm%link_horizontal_data(horizontal_id, aerosol_air_mass_type) ! - horizontal_id = model_fabm%get_horizontal_variable_id('surface_specific_humidity') From c42615180e22d5144f688e63d8a0939abd65c6a4 Mon Sep 17 00:00:00 2001 From: Marco-Puglia Date: Thu, 16 Apr 2026 10:15:54 +0200 Subject: [PATCH 80/97] Fixed error message to include the new FABM-BFM flag. --- testcase/create_bc_nc.py | 8 ++++---- testcase/create_init_nc.py | 5 ++--- testcase/deploy_code.py | 2 +- 3 files changed, 7 insertions(+), 8 deletions(-) diff --git a/testcase/create_bc_nc.py b/testcase/create_bc_nc.py index 5d114b36..67d5ea8e 100644 --- a/testcase/create_bc_nc.py +++ b/testcase/create_bc_nc.py @@ -87,7 +87,7 @@ def create_bc_nc(test): ncvar = ncOUT.createVariable('reP1_DW' ,'d',('time','z','y','x') ); ncvar[:] = D3*0.; ncvar = ncOUT.createVariable('reZ1_DWz' ,'d',('time','z','y','x') ); ncvar[:] = D3*0.; else: - print("BGC_TYPE " + test['BGC_TYPE'].decode() + "wrong/undefined choose within [DEFAULT[Default,default], BFM[bfm], FABM[fabm]]") + print("[ERROR] BGC_TYPE='" + test['BGC_TYPE'].decode() + "' is wrong/undefined. Expected one of: [DEFAULT[Default,default], BFM[bfm], FABM-BFM[fabm-bfm]]") sys.exit() ncvar = ncOUT.createVariable('index' ,'i',('time','z','y','x') ); ncvar[:] = index; @@ -141,8 +141,8 @@ def create_bc_nc(test): elif test['BGC_TYPE'].decode() in ['FABM-ROSENMCARTUR','fabm-rosenmcartur']: ncvar = ncOUT.createVariable('atm_P1_DW' ,'f',('lat','lon') ); ncvar[:] = 0.0; ncvar = ncOUT.createVariable('atm_Z1_DWz' ,'f',('lat','lon') ); ncvar[:] = 0.0; - else: - print("BGC_TYPE " + test['BGC_TYPE'].decode() + "wrong/undefined choose within [DEFAULT[Default,default], BFM[bfm], FABM[fabm]]") + else: + print("[ERROR] BGC_TYPE='" + test['BGC_TYPE'].decode() + "' is wrong/undefined. Expected one of: [DEFAULT[Default,default], BFM[bfm], FABM-BFM[fabm-bfm]]") sys.exit() ncOUT.close() @@ -242,7 +242,7 @@ def create_bc_nc(test): ncvar = ncOUT.createVariable('riv_P1_DW' ,'d',('riv_idxt',) ); ncvar[:] = 0.0; ncvar = ncOUT.createVariable('riv_Z1_DWz' ,'d',('riv_idxt',) ); ncvar[:] = 0.0; else: - print("BGC_TYPE " + test['BGC_TYPE'].decode() + "wrong/undefined choose within [DEFAULT[Default,default], BFM[bfm], FABM[fabm]]") + print("[ERROR] BGC_TYPE='" + test['BGC_TYPE'].decode() + "' is wrong/undefined. Expected one of: [DEFAULT[Default,default], BFM[bfm], FABM-BFM[fabm-bfm]]") sys.exit() ncOUT.close() diff --git a/testcase/create_init_nc.py b/testcase/create_init_nc.py index 3cc40630..4b64dd0a 100644 --- a/testcase/create_init_nc.py +++ b/testcase/create_init_nc.py @@ -45,8 +45,7 @@ def create_init_nc(test): print(f" {variable.name} = {variable.long_name} ({variable.units})") initVARS.append(variable.name) else: - - print("BGC_TYPE " + test['BGC_TYPE'].decode() + "wrong/undefined choose within [DEFAULT[Default,default], BFM[bfm], FABM[fabm]]") + print("[ERROR] BGC_TYPE='" + test['BGC_TYPE'].decode() + "' is wrong/undefined. Expected one of: [DEFAULT[Default,default], BFM[bfm], FABM-BFM[fabm-bfm]]") sys.exit() jpi=test['jpi']; @@ -87,7 +86,7 @@ def create_init_nc(test): var=var.replace('/','_') filename = "KB/INIT_NWM_KB_FABM_ROSENMCARTUR/INIT." + var else: - print("BGC_TYPE " + test['BGC_TYPE'].decode() + "wrong/undefined choose within [DEFAULT[Default,default], BFM[bfm], FABM[fabm]]") + print("[ERROR] BGC_TYPE='" + test['BGC_TYPE'].decode() + "' is wrong/undefined. Expected one of: [DEFAULT[Default,default], BFM[bfm], FABM-BFM[fabm-bfm]]") sys.exit() din = np.loadtxt(filename) diff --git a/testcase/deploy_code.py b/testcase/deploy_code.py index 651a3ad9..53be260e 100644 --- a/testcase/deploy_code.py +++ b/testcase/deploy_code.py @@ -74,6 +74,6 @@ def deploy_code(test): os.system("cp -pf ogstm.yaml " + test['Dir'].decode() + "/ogstm.yaml") else: - print("BGC_TYPE " + test['BGC_TYPE'].decode() + "wrong/undefined choose within [DEFAULT[Default,default], BFM[bfm], FABM[fabm]]") + print("[ERROR] BGC_TYPE='" + test['BGC_TYPE'].decode() + "' is wrong/undefined. Expected one of: [DEFAULT[Default,default], BFM[bfm], FABM-BFM[fabm-bfm]]") sys.exit() From 604342dc4735c46b58dc88074cb5931882c02373 Mon Sep 17 00:00:00 2001 From: Paolo Lazzari Date: Thu, 16 Apr 2026 12:25:12 +0200 Subject: [PATCH 81/97] Select activation of ogstm OASIM model according to FABM.yaml file --- src/BIO-OPTICS/oasim_caller.f90 | 4 ++++ src/BIO/BIO_mem.f90 | 24 ++++++++++++++++++++++++ src/IO/forcing_kext.f90 | 15 ++++++++++++--- 3 files changed, 40 insertions(+), 3 deletions(-) diff --git a/src/BIO-OPTICS/oasim_caller.f90 b/src/BIO-OPTICS/oasim_caller.f90 index 9fabb9a5..a5009aa7 100644 --- a/src/BIO-OPTICS/oasim_caller.f90 +++ b/src/BIO-OPTICS/oasim_caller.f90 @@ -2,6 +2,7 @@ subroutine OASIM_CALLER(datestring) use myalloc use OPT_mem +use BIO_mem use TIME_MANAGER use mpi use oasim, only: calc_unit, oasim_lib @@ -39,6 +40,8 @@ subroutine OASIM_CALLER(datestring) CALL forcings_atm_clim(datestring) CALL forcings_atm_aero(datestring) +if (.NOT. is_FABM_instance(model_fabm,'light_atm')) then + counter=1 do ji=1,jpi do jj=1,jpj @@ -87,6 +90,7 @@ subroutine OASIM_CALLER(datestring) call trc3streams(datestring) ! 3-stream radiative model +end if ! is_FABM_istance(model_fabm,'light_atm') trcoptparttime = MPI_WTIME() - trcoptparttime ! cronometer-stop trcopttottime = trcopttottime + trcoptparttime diff --git a/src/BIO/BIO_mem.f90 b/src/BIO/BIO_mem.f90 index e92b47d3..a5f93416 100644 --- a/src/BIO/BIO_mem.f90 +++ b/src/BIO/BIO_mem.f90 @@ -6,6 +6,7 @@ MODULE BIO_mem #ifdef key_trc_fabm USE fabm + USE fabm_types USE OPT_mem #endif @@ -267,7 +268,30 @@ subroutine myalloc_BIO() END subroutine myalloc_BIO +#ifdef key_trc_fabm + logical function is_FABM_instance(model,instance_name) + class (type_fabm_model), pointer, intent(in) :: model + character(len=*), intent(in) :: instance_name + type (type_model_list_node), pointer :: instance + + instance => model%root%children%first + + do while (associated(instance)) + if (instance%model%user_created) then + if (trim(instance%model%name) == trim(instance_name)) then + is_FABM_instance = .true. + return + endif + end if + instance => instance%next + end do + + is_FABM_instance = .false. + return + + end function is_FABM_instance +#endif subroutine clean_memory_bio() diff --git a/src/IO/forcing_kext.f90 b/src/IO/forcing_kext.f90 index 9e69fb76..5677e51b 100644 --- a/src/IO/forcing_kext.f90 +++ b/src/IO/forcing_kext.f90 @@ -5,6 +5,7 @@ SUBROUTINE forcings_KEXT(datestring) USE myalloc ! epascolo USE myalloc_mpp USE OPT_mem + USE BIO_mem USE TIME_MANAGER USE mpi IMPLICIT NONE @@ -99,6 +100,7 @@ SUBROUTINE LOAD_KEXT(datestring) USE myalloc ! epascolo USE myalloc_mpp USE OPT_mem + USE BIO_mem USE TIME_MANAGER USE BC_mem @@ -130,15 +132,22 @@ SUBROUTINE LOAD_KEXT(datestring) mslIO(:,:,2) = buf2*tmask(1,:,:) call readnc_slice_float_2d(nomefile,'t2m',buf2,0) - t2mIO(:,:,2) = buf2*tmask(1,:,:) + if (is_FABM_instance(model_fabm,'light_atm')) then + t2mIO(:,:,2) = buf2*tmask(1,:,:)-273.15d0 + else + t2mIO(:,:,2) = buf2*tmask(1,:,:) + endif call readnc_slice_float_2d(nomefile,'d2m',buf2,0) d2mIO(:,:,2) = buf2*tmask(1,:,:) call readnc_slice_float_2d(nomefile,'tcc',buf2,0) - tccIO(:,:,2) = buf2*tmask(1,:,:) - + if (is_FABM_instance(model_fabm,'light_atm')) then + tccIO(:,:,2) = buf2*tmask(1,:,:)/100.0D0 + else + tccIO(:,:,2) = buf2*tmask(1,:,:) + endif call readnc_slice_float_2d(nomefile,'u10',buf2,0) call readnc_slice_float_2d(nomefile,'v10',junk,0) From 23ee2e1a6c8a8bc25172c1c87673bd9545c28862 Mon Sep 17 00:00:00 2001 From: Paolo Lazzari Date: Fri, 17 Apr 2026 12:23:03 +0200 Subject: [PATCH 82/97] adding automatic selction of atmospheric model from fabm version or BIOPTIMOD version --- src/BIO-OPTICS/OPT_mem.f90 | 15 ++++++++++++--- src/BIO-OPTICS/oasim_caller.f90 | 4 ++-- src/BIO/BIO_mem.f90 | 26 +++++++++++++++++++++++++- src/IO/forcing_kext.f90 | 4 ++-- 4 files changed, 41 insertions(+), 8 deletions(-) diff --git a/src/BIO-OPTICS/OPT_mem.f90 b/src/BIO-OPTICS/OPT_mem.f90 index 3ed84611..fa64032a 100644 --- a/src/BIO-OPTICS/OPT_mem.f90 +++ b/src/BIO-OPTICS/OPT_mem.f90 @@ -12,7 +12,7 @@ MODULE OPT_mem public - + LOGICAL :: oasim_bioptimod=.FALSE., oasim_fabm=.FALSE. INTEGER, allocatable :: itabe(:),imaske(:,:) double precision, allocatable :: zpar(:,:),xEPS_ogstm(:,:) double precision, allocatable :: zpar0m(:),zpar100(:) @@ -71,11 +71,17 @@ MODULE OPT_mem integer, parameter :: nlt=33 integer :: lam(33) double precision :: WtoQ(33) +! Wavelength strings with 4-digit zero padding + CHARACTER(LEN=4), parameter :: lam_strings(33) = (/ & + '0250', '0325', '0350', '0375', '0400', '0425', '0450', '0475', '0500', '0525', & + '0550', '0575', '0600', '0625', '0650', '0675', '0700', '0725', '0775', '0850', & + '0950', '1050', '1150', '1250', '1350', '1450', '1550', '1650', '1750', '1900', & + '2200', '2900', '3700' /) ! Radiative transfer model parameter OASIM Native coordinates double precision :: Ed_0m_COARSE(33,12,18,48), Es_0m_COARSE(33,12,18,48) ! lon, lat, day period, wave length double precision :: OASIM_lon(18,48), OASIM_lat(18,48) ! Radiative transfer model parameter OGSTM coordinates - double precision,allocatable :: Ed_0m(:,:,:), Es_0m(:,:,:) ! wav, lat, lon + double precision,target,allocatable :: Ed_0m(:,:,:), Es_0m(:,:,:) ! wav, lat, lon INTEGER :: day_RTcheck ! in-water model @@ -163,7 +169,10 @@ subroutine myalloc_OPT() ! kef = huge(kef(1,1)) ! allocate(kextIO(jpj,jpi,2)) ! kextIO = huge(kextIO(1,1,1)) - +#ifdef key_trc_bfm + oasim_bioptimod=.TRUE. + write(numout,*) 'OASIM optical model will be used' +#endif allocate(sp (jpj,jpi)) ; sp =huge(sp(1,1)) allocate(msl(jpj,jpi)) ; msl=huge(sp(1,1)) allocate(t2m(jpj,jpi)) ; t2m=huge(sp(1,1)) diff --git a/src/BIO-OPTICS/oasim_caller.f90 b/src/BIO-OPTICS/oasim_caller.f90 index a5009aa7..66f48c68 100644 --- a/src/BIO-OPTICS/oasim_caller.f90 +++ b/src/BIO-OPTICS/oasim_caller.f90 @@ -40,7 +40,7 @@ subroutine OASIM_CALLER(datestring) CALL forcings_atm_clim(datestring) CALL forcings_atm_aero(datestring) -if (.NOT. is_FABM_instance(model_fabm,'light_atm')) then +if (oasim_bioptimod) then counter=1 do ji=1,jpi @@ -90,7 +90,7 @@ subroutine OASIM_CALLER(datestring) call trc3streams(datestring) ! 3-stream radiative model -end if ! is_FABM_istance(model_fabm,'light_atm') +end if ! oasim_bioptimod trcoptparttime = MPI_WTIME() - trcoptparttime ! cronometer-stop trcopttottime = trcopttottime + trcoptparttime diff --git a/src/BIO/BIO_mem.f90 b/src/BIO/BIO_mem.f90 index a5f93416..486f81ec 100644 --- a/src/BIO/BIO_mem.f90 +++ b/src/BIO/BIO_mem.f90 @@ -56,6 +56,17 @@ subroutine initialize_FABM() jptra_flux=0 jptra_dia=jptra_var+jptra_flux jptra_dia_2d=size(model_fabm%horizontal_diagnostic_variables) +! optical modules + if (is_FABM_instance(model_fabm,'light_atm')) then + oasim_fabm=.TRUE. + oasim_bioptimod=.FALSE. + write(numout,*) 'FABM-OASIM optical model will be used in OGSTM' + end if + if (is_FABM_instance(model_fabm,'lightspectral')) then + oasim_fabm=.FALSE. + oasim_bioptimod=.TRUE. + write(numout,*) 'BIOPTIMOD OASIM optical model will be used in OGSTM' + end if END subroutine initialize_FABM #endif @@ -64,10 +75,11 @@ subroutine myalloc_BIO() INTEGER :: err INTEGER :: ivar - INTEGER :: ji,jj,jn + INTEGER :: ji,jj,jn,jl INTEGER :: year, month, day double precision :: sec double precision :: aux_mem + character(LEN=256) :: varname #ifdef key_trc_fabm type (type_fabm_interior_variable_id) :: interior_id type (type_fabm_horizontal_variable_id) :: horizontal_id @@ -178,7 +190,19 @@ subroutine myalloc_BIO() yearday = 1.5d0 call model_fabm%link_scalar(id_yearday, yearday) ! - days + if (oasim_bioptimod) then + do jl=1,nlt + + varname = 'surf_direct_downward_irradiance_' // lam_strings(jl) // '_nm' + horizontal_id = model_fabm%get_horizontal_variable_id(TRIM(varname)) + call model_fabm%link_horizontal_data(horizontal_id, Ed_0m(jl,:,:)) ! W m^-2 + varname = 'surf_diffuse_downward_irradiance_' // lam_strings(jl) // '_nm' + horizontal_id = model_fabm%get_horizontal_variable_id(TRIM(varname)) + call model_fabm%link_horizontal_data(horizontal_id, Es_0m(jl,:,:)) ! W m^-2 + + end do + end if ! Complete initialization and check whether FABM has all dependencies fulfilled ! (i.e., whether all required calls to model%link_*_data have been made) diff --git a/src/IO/forcing_kext.f90 b/src/IO/forcing_kext.f90 index 5677e51b..7b62e607 100644 --- a/src/IO/forcing_kext.f90 +++ b/src/IO/forcing_kext.f90 @@ -132,7 +132,7 @@ SUBROUTINE LOAD_KEXT(datestring) mslIO(:,:,2) = buf2*tmask(1,:,:) call readnc_slice_float_2d(nomefile,'t2m',buf2,0) - if (is_FABM_instance(model_fabm,'light_atm')) then + if (oasim_fabm) then t2mIO(:,:,2) = buf2*tmask(1,:,:)-273.15d0 else t2mIO(:,:,2) = buf2*tmask(1,:,:) @@ -143,7 +143,7 @@ SUBROUTINE LOAD_KEXT(datestring) call readnc_slice_float_2d(nomefile,'tcc',buf2,0) - if (is_FABM_instance(model_fabm,'light_atm')) then + if (oasim_fabm) then tccIO(:,:,2) = buf2*tmask(1,:,:)/100.0D0 else tccIO(:,:,2) = buf2*tmask(1,:,:) From c628521246801c267eb5e358b9e7f9b7d3055ca5 Mon Sep 17 00:00:00 2001 From: Paolo Lazzari Date: Tue, 21 Apr 2026 12:19:26 +0200 Subject: [PATCH 83/97] Create init files for BFM98 --- testcase/KB/create_KB98.py | 95 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 95 insertions(+) create mode 100644 testcase/KB/create_KB98.py diff --git a/testcase/KB/create_KB98.py b/testcase/KB/create_KB98.py new file mode 100644 index 00000000..707bed66 --- /dev/null +++ b/testcase/KB/create_KB98.py @@ -0,0 +1,95 @@ +#!/usr/bin/env python3 +import os +from pathlib import Path + +# Cartella di input/output +input_dir = Path("INIT_NWM_KB_FABM") +output_dir = Path("INIT_NWM_KB_FABM98") +output_dir.mkdir(exist_ok=True) + +# Dizionario di mapping: +# chiave = nome file originale +# valore = lista dei nuovi file da creare +mapping = { + "INIT.B1_c": ["INIT.B1_m5"], + "INIT.P1_c": ["INIT.P1_11_c", "INIT.P1_12_c", "INIT.P1_13_c", "INIT.P1_14_c", "INIT.P1_15_c", "INIT.P1_16_c", "INIT.P1_17_c", "INIT.P1_18_c", "INIT.P1_19_c", "INIT.P1_20_c"], + "INIT.P1_n": ["INIT.P1_11_n", "INIT.P1_12_n", "INIT.P1_13_n", "INIT.P1_14_n", "INIT.P1_15_n", "INIT.P1_16_n", "INIT.P1_17_n", "INIT.P1_18_n", "INIT.P1_19_n", "INIT.P1_20_n"], + "INIT.P1_p": ["INIT.P1_11_p", "INIT.P1_12_p", "INIT.P1_13_p", "INIT.P1_14_p", "INIT.P1_15_p", "INIT.P1_16_p", "INIT.P1_17_p", "INIT.P1_18_p", "INIT.P1_19_p", "INIT.P1_20_p"], + "INIT.P1_Chl": ["INIT.P1_11_Chl", "INIT.P1_12_Chl", "INIT.P1_13_Chl", "INIT.P1_14_Chl", "INIT.P1_15_Chl", "INIT.P1_16_Chl", "INIT.P1_17_Chl", "INIT.P1_18_Chl", "INIT.P1_19_Chl", "INIT.P1_20_Chl"], + "INIT.P1_s": ["INIT.P1_11_s", "INIT.P1_12_s", "INIT.P1_13_s", "INIT.P1_14_s", "INIT.P1_15_s", "INIT.P1_16_s", "INIT.P1_17_s", "INIT.P1_18_s", "INIT.P1_19_s", "INIT.P1_20_s"], + "INIT.P4_c": ["INIT.P4_11_c", "INIT.P4_12_c", "INIT.P4_13_c", "INIT.P4_14_c", "INIT.P4_15_c", "INIT.P4_16_c", "INIT.P4_17_c", "INIT.P4_18_c", "INIT.P4_19_c", "INIT.P4_20_c"], + "INIT.P4_n": ["INIT.P4_11_n", "INIT.P4_12_n", "INIT.P4_13_n", "INIT.P4_14_n", "INIT.P4_15_n", "INIT.P4_16_n", "INIT.P4_17_n", "INIT.P4_18_n", "INIT.P4_19_n", "INIT.P4_20_n"], + "INIT.P4_p": ["INIT.P4_11_p", "INIT.P4_12_p", "INIT.P4_13_p", "INIT.P4_14_p", "INIT.P4_15_p", "INIT.P4_16_p", "INIT.P4_17_p", "INIT.P4_18_p", "INIT.P4_19_p", "INIT.P4_20_p"], + "INIT.P4_Chl": ["INIT.P4_11_Chl", "INIT.P4_12_Chl", "INIT.P4_13_Chl", "INIT.P4_14_Chl", "INIT.P4_15_Chl", "INIT.P4_16_Chl", "INIT.P4_17_Chl", "INIT.P4_18_Chl", "INIT.P4_19_Chl", "INIT.P4_20_Chl"], + "INIT.P2_c": ["INIT.P2_4_c", "INIT.P2_5_c", "INIT.P2_6_c", "INIT.P2_7_c", "INIT.P2_8_c", "INIT.P2_9_c", "INIT.P2_10_c", "INIT.P2_11_c", "INIT.P2_12_c", "INIT.P2_13_c"], + "INIT.P2_n": ["INIT.P2_4_n", "INIT.P2_5_n", "INIT.P2_6_n", "INIT.P2_7_n", "INIT.P2_8_n", "INIT.P2_9_n", "INIT.P2_10_n", "INIT.P2_11_n", "INIT.P2_12_n", "INIT.P2_13_n"], + "INIT.P2_p": ["INIT.P2_4_p", "INIT.P2_5_p", "INIT.P2_6_p", "INIT.P2_7_p", "INIT.P2_8_p", "INIT.P2_9_p", "INIT.P2_10_p", "INIT.P2_11_p", "INIT.P2_12_p", "INIT.P2_13_p"], + "INIT.P2_Chl": ["INIT.P2_4_Chl", "INIT.P2_5_Chl", "INIT.P2_6_Chl", "INIT.P2_7_Chl", "INIT.P2_8_Chl", "INIT.P2_9_Chl", "INIT.P2_10_Chl", "INIT.P2_11_Chl", "INIT.P2_12_Chl", "INIT.P2_13_Chl"], + "INIT.P5_c": ["INIT.P5_6_c", "INIT.P5_7_c", "INIT.P5_8_c", "INIT.P5_9_c", "INIT.P5_10_c", "INIT.P5_11_c", "INIT.P5_12_c", "INIT.P5_13_c", "INIT.P5_14_c", "INIT.P5_15_c"], + "INIT.P5_n": ["INIT.P5_6_n", "INIT.P5_7_n", "INIT.P5_8_n", "INIT.P5_9_n", "INIT.P5_10_n", "INIT.P5_11_n", "INIT.P5_12_n", "INIT.P5_13_n", "INIT.P5_14_n", "INIT.P5_15_n"], + "INIT.P5_p": ["INIT.P5_6_p", "INIT.P5_7_p", "INIT.P5_8_p", "INIT.P5_9_p", "INIT.P5_10_p", "INIT.P5_11_p", "INIT.P5_12_p", "INIT.P5_13_p", "INIT.P5_14_p", "INIT.P5_15_p"], + "INIT.P5_Chl": ["INIT.P5_6_Chl", "INIT.P5_7_Chl", "INIT.P5_8_Chl", "INIT.P5_9_Chl", "INIT.P5_10_Chl", "INIT.P5_11_Chl", "INIT.P5_12_Chl", "INIT.P5_13_Chl", "INIT.P5_14_Chl", "INIT.P5_15_Chl"], + "INIT.P7_c": ["INIT.P7_2_c", "INIT.P7_3_c", "INIT.P7_4_c", "INIT.P7_5_c", "INIT.P7_6_c", "INIT.P7_7_c"], + "INIT.P7_n": ["INIT.P7_2_n", "INIT.P7_3_n", "INIT.P7_4_n", "INIT.P7_5_n", "INIT.P7_6_n", "INIT.P7_7_n"], + "INIT.P7_p": ["INIT.P7_2_p", "INIT.P7_3_p", "INIT.P7_4_p", "INIT.P7_5_p", "INIT.P7_6_p", "INIT.P7_7_p"], + "INIT.P7_Chl": ["INIT.P7_2_Chl", "INIT.P7_3_Chl", "INIT.P7_4_Chl", "INIT.P7_5_Chl", "INIT.P7_6_Chl", "INIT.P7_7_Chl"], + "INIT.P8_c": ["INIT.P8_2_c", "INIT.P8_3_c", "INIT.P8_4_c", "INIT.P8_5_c", "INIT.P8_6_c", "INIT.P8_7_c"], + "INIT.P8_n": ["INIT.P8_2_n", "INIT.P8_3_n", "INIT.P8_4_n", "INIT.P8_5_n", "INIT.P8_6_n", "INIT.P8_7_n"], + "INIT.P8_p": ["INIT.P8_2_p", "INIT.P8_3_p", "INIT.P8_4_p", "INIT.P8_5_p", "INIT.P8_6_p", "INIT.P8_7_p"], + "INIT.P8_Chl": ["INIT.P8_2_Chl", "INIT.P8_3_Chl", "INIT.P8_4_Chl", "INIT.P8_5_Chl", "INIT.P8_6_Chl", "INIT.P8_7_Chl"], + # aggiungi qui gli altri mapping +} + +def read_values(filepath): + values = [] + with open(filepath, "r") as f: + for line in f: + line = line.strip() + if not line: + continue + values.append(float(line)) + return values + +def write_values(filepath, values): + with open(filepath, "w") as f: + for v in values: + f.write(f"{v:.20f}\n") + +def main(): + for infile in input_dir.iterdir(): + if not infile.is_file(): + continue + + old_name = infile.name + + # considera solo i file presenti nel dizionario + if old_name not in mapping: + print(f"Salto {old_name}: non presente nel dizionario") + continue + + new_names = mapping[old_name] + nout = len(new_names) + + if nout == 0: + print(f"Salto {old_name}: lista di output vuota") + continue + + try: + values = read_values(infile) + except Exception as e: + print(f"Errore leggendo {old_name}: {e}") + continue + + # dividi i valori per il numero di file di uscita + new_values = [v / nout for v in values] + + for new_name in new_names: + outfile = output_dir / new_name + try: + write_values(outfile, new_values) + print(f"Creato {outfile}") + except Exception as e: + print(f"Errore scrivendo {outfile}: {e}") + +if __name__ == "__main__": + main() \ No newline at end of file From dcdf3aa806a9357dd162e5b93aa623e3651aeabf Mon Sep 17 00:00:00 2001 From: Paolo Lazzari Date: Wed, 22 Apr 2026 14:05:53 +0200 Subject: [PATCH 84/97] script to generate vertical profiles for BFM98 --- testcase/KB/create_KB98.py | 89 ++++++++++++++++++++++++++------------ 1 file changed, 61 insertions(+), 28 deletions(-) diff --git a/testcase/KB/create_KB98.py b/testcase/KB/create_KB98.py index 707bed66..c85148a4 100644 --- a/testcase/KB/create_KB98.py +++ b/testcase/KB/create_KB98.py @@ -11,33 +11,66 @@ # chiave = nome file originale # valore = lista dei nuovi file da creare mapping = { - "INIT.B1_c": ["INIT.B1_m5"], - "INIT.P1_c": ["INIT.P1_11_c", "INIT.P1_12_c", "INIT.P1_13_c", "INIT.P1_14_c", "INIT.P1_15_c", "INIT.P1_16_c", "INIT.P1_17_c", "INIT.P1_18_c", "INIT.P1_19_c", "INIT.P1_20_c"], - "INIT.P1_n": ["INIT.P1_11_n", "INIT.P1_12_n", "INIT.P1_13_n", "INIT.P1_14_n", "INIT.P1_15_n", "INIT.P1_16_n", "INIT.P1_17_n", "INIT.P1_18_n", "INIT.P1_19_n", "INIT.P1_20_n"], - "INIT.P1_p": ["INIT.P1_11_p", "INIT.P1_12_p", "INIT.P1_13_p", "INIT.P1_14_p", "INIT.P1_15_p", "INIT.P1_16_p", "INIT.P1_17_p", "INIT.P1_18_p", "INIT.P1_19_p", "INIT.P1_20_p"], - "INIT.P1_Chl": ["INIT.P1_11_Chl", "INIT.P1_12_Chl", "INIT.P1_13_Chl", "INIT.P1_14_Chl", "INIT.P1_15_Chl", "INIT.P1_16_Chl", "INIT.P1_17_Chl", "INIT.P1_18_Chl", "INIT.P1_19_Chl", "INIT.P1_20_Chl"], - "INIT.P1_s": ["INIT.P1_11_s", "INIT.P1_12_s", "INIT.P1_13_s", "INIT.P1_14_s", "INIT.P1_15_s", "INIT.P1_16_s", "INIT.P1_17_s", "INIT.P1_18_s", "INIT.P1_19_s", "INIT.P1_20_s"], - "INIT.P4_c": ["INIT.P4_11_c", "INIT.P4_12_c", "INIT.P4_13_c", "INIT.P4_14_c", "INIT.P4_15_c", "INIT.P4_16_c", "INIT.P4_17_c", "INIT.P4_18_c", "INIT.P4_19_c", "INIT.P4_20_c"], - "INIT.P4_n": ["INIT.P4_11_n", "INIT.P4_12_n", "INIT.P4_13_n", "INIT.P4_14_n", "INIT.P4_15_n", "INIT.P4_16_n", "INIT.P4_17_n", "INIT.P4_18_n", "INIT.P4_19_n", "INIT.P4_20_n"], - "INIT.P4_p": ["INIT.P4_11_p", "INIT.P4_12_p", "INIT.P4_13_p", "INIT.P4_14_p", "INIT.P4_15_p", "INIT.P4_16_p", "INIT.P4_17_p", "INIT.P4_18_p", "INIT.P4_19_p", "INIT.P4_20_p"], - "INIT.P4_Chl": ["INIT.P4_11_Chl", "INIT.P4_12_Chl", "INIT.P4_13_Chl", "INIT.P4_14_Chl", "INIT.P4_15_Chl", "INIT.P4_16_Chl", "INIT.P4_17_Chl", "INIT.P4_18_Chl", "INIT.P4_19_Chl", "INIT.P4_20_Chl"], - "INIT.P2_c": ["INIT.P2_4_c", "INIT.P2_5_c", "INIT.P2_6_c", "INIT.P2_7_c", "INIT.P2_8_c", "INIT.P2_9_c", "INIT.P2_10_c", "INIT.P2_11_c", "INIT.P2_12_c", "INIT.P2_13_c"], - "INIT.P2_n": ["INIT.P2_4_n", "INIT.P2_5_n", "INIT.P2_6_n", "INIT.P2_7_n", "INIT.P2_8_n", "INIT.P2_9_n", "INIT.P2_10_n", "INIT.P2_11_n", "INIT.P2_12_n", "INIT.P2_13_n"], - "INIT.P2_p": ["INIT.P2_4_p", "INIT.P2_5_p", "INIT.P2_6_p", "INIT.P2_7_p", "INIT.P2_8_p", "INIT.P2_9_p", "INIT.P2_10_p", "INIT.P2_11_p", "INIT.P2_12_p", "INIT.P2_13_p"], - "INIT.P2_Chl": ["INIT.P2_4_Chl", "INIT.P2_5_Chl", "INIT.P2_6_Chl", "INIT.P2_7_Chl", "INIT.P2_8_Chl", "INIT.P2_9_Chl", "INIT.P2_10_Chl", "INIT.P2_11_Chl", "INIT.P2_12_Chl", "INIT.P2_13_Chl"], - "INIT.P5_c": ["INIT.P5_6_c", "INIT.P5_7_c", "INIT.P5_8_c", "INIT.P5_9_c", "INIT.P5_10_c", "INIT.P5_11_c", "INIT.P5_12_c", "INIT.P5_13_c", "INIT.P5_14_c", "INIT.P5_15_c"], - "INIT.P5_n": ["INIT.P5_6_n", "INIT.P5_7_n", "INIT.P5_8_n", "INIT.P5_9_n", "INIT.P5_10_n", "INIT.P5_11_n", "INIT.P5_12_n", "INIT.P5_13_n", "INIT.P5_14_n", "INIT.P5_15_n"], - "INIT.P5_p": ["INIT.P5_6_p", "INIT.P5_7_p", "INIT.P5_8_p", "INIT.P5_9_p", "INIT.P5_10_p", "INIT.P5_11_p", "INIT.P5_12_p", "INIT.P5_13_p", "INIT.P5_14_p", "INIT.P5_15_p"], - "INIT.P5_Chl": ["INIT.P5_6_Chl", "INIT.P5_7_Chl", "INIT.P5_8_Chl", "INIT.P5_9_Chl", "INIT.P5_10_Chl", "INIT.P5_11_Chl", "INIT.P5_12_Chl", "INIT.P5_13_Chl", "INIT.P5_14_Chl", "INIT.P5_15_Chl"], - "INIT.P7_c": ["INIT.P7_2_c", "INIT.P7_3_c", "INIT.P7_4_c", "INIT.P7_5_c", "INIT.P7_6_c", "INIT.P7_7_c"], - "INIT.P7_n": ["INIT.P7_2_n", "INIT.P7_3_n", "INIT.P7_4_n", "INIT.P7_5_n", "INIT.P7_6_n", "INIT.P7_7_n"], - "INIT.P7_p": ["INIT.P7_2_p", "INIT.P7_3_p", "INIT.P7_4_p", "INIT.P7_5_p", "INIT.P7_6_p", "INIT.P7_7_p"], - "INIT.P7_Chl": ["INIT.P7_2_Chl", "INIT.P7_3_Chl", "INIT.P7_4_Chl", "INIT.P7_5_Chl", "INIT.P7_6_Chl", "INIT.P7_7_Chl"], - "INIT.P8_c": ["INIT.P8_2_c", "INIT.P8_3_c", "INIT.P8_4_c", "INIT.P8_5_c", "INIT.P8_6_c", "INIT.P8_7_c"], - "INIT.P8_n": ["INIT.P8_2_n", "INIT.P8_3_n", "INIT.P8_4_n", "INIT.P8_5_n", "INIT.P8_6_n", "INIT.P8_7_n"], - "INIT.P8_p": ["INIT.P8_2_p", "INIT.P8_3_p", "INIT.P8_4_p", "INIT.P8_5_p", "INIT.P8_6_p", "INIT.P8_7_p"], - "INIT.P8_Chl": ["INIT.P8_2_Chl", "INIT.P8_3_Chl", "INIT.P8_4_Chl", "INIT.P8_5_Chl", "INIT.P8_6_Chl", "INIT.P8_7_Chl"], - # aggiungi qui gli altri mapping + "INIT.depth": ["INIT.depth"], + "INIT.N1_p": ["INIT.N1_p"], + "INIT.N3_n": ["INIT.N3_n"], + "INIT.N4_n": ["INIT.N4_n"], + "INIT.N5_s": ["INIT.N5_s"], + "INIT.N6_r": ["INIT.N6_r"], + "INIT.O2_o": ["INIT.O2_o"], + "INIT.O3_c": ["INIT.O3_c"], + "INIT.O3h_h": ["INIT.O3h_h"], + "INIT.O4_n": ["INIT.O4_n"], + "INIT.O5_c": ["INIT.O5_c"], + "INIT.R1_c": ["INIT.R1_c"], + "INIT.R1_n": ["INIT.R1_n"], + "INIT.R1_p": ["INIT.R1_p"], + "INIT.R1_s": ["INIT.R1_s"], + "INIT.R2_c": ["INIT.R2_c"], + "INIT.R3_c": ["INIT.R3_c"], + "INIT.R6_c": ["INIT.R6_c"], + "INIT.R6_n": ["INIT.R6_n"], + "INIT.R6_p": ["INIT.R6_p"], + "INIT.R6_s": ["INIT.R6_s"], + "INIT.R8_c": ["INIT.R8_c"], + "INIT.R8_n": ["INIT.R8_n"], + "INIT.R8_p": ["INIT.R8_p"], + "INIT.R8_s": ["INIT.R8_s"], + "INIT.X1_c": ["INIT.X1_c"], + "INIT.X2_c": ["INIT.X2_c"], + "INIT.X3_c": ["INIT.X3_c"], + "INIT.B1_c": ["INIT.B1_m5_c"], + "INIT.B1_n": ["INIT.B1_m5_n"], + "INIT.B1_p": ["INIT.B1_m5_p"], + "INIT.P1_c": ["INIT.P1_11_c", "INIT.P1_12_c", "INIT.P1_13_c", "INIT.P1_14_c", "INIT.P1_15_c", "INIT.P1_16_c", "INIT.P1_17_c", "INIT.P1_18_c", "INIT.P1_19_c", "INIT.P1_20_c"], + "INIT.P1_n": ["INIT.P1_11_n", "INIT.P1_12_n", "INIT.P1_13_n", "INIT.P1_14_n", "INIT.P1_15_n", "INIT.P1_16_n", "INIT.P1_17_n", "INIT.P1_18_n", "INIT.P1_19_n", "INIT.P1_20_n"], + "INIT.P1_p": ["INIT.P1_11_p", "INIT.P1_12_p", "INIT.P1_13_p", "INIT.P1_14_p", "INIT.P1_15_p", "INIT.P1_16_p", "INIT.P1_17_p", "INIT.P1_18_p", "INIT.P1_19_p", "INIT.P1_20_p"], + "INIT.P1_Chl": ["INIT.P1_11_Chl", "INIT.P1_12_Chl", "INIT.P1_13_Chl", "INIT.P1_14_Chl", "INIT.P1_15_Chl", "INIT.P1_16_Chl", "INIT.P1_17_Chl", "INIT.P1_18_Chl", "INIT.P1_19_Chl", "INIT.P1_20_Chl"], + "INIT.P1_s": ["INIT.P1_11_s", "INIT.P1_12_s", "INIT.P1_13_s", "INIT.P1_14_s", "INIT.P1_15_s", "INIT.P1_16_s", "INIT.P1_17_s", "INIT.P1_18_s", "INIT.P1_19_s", "INIT.P1_20_s"], + "INIT.P4_c": ["INIT.P4_11_c", "INIT.P4_12_c", "INIT.P4_13_c", "INIT.P4_14_c", "INIT.P4_15_c", "INIT.P4_16_c", "INIT.P4_17_c", "INIT.P4_18_c", "INIT.P4_19_c", "INIT.P4_20_c"], + "INIT.P4_n": ["INIT.P4_11_n", "INIT.P4_12_n", "INIT.P4_13_n", "INIT.P4_14_n", "INIT.P4_15_n", "INIT.P4_16_n", "INIT.P4_17_n", "INIT.P4_18_n", "INIT.P4_19_n", "INIT.P4_20_n"], + "INIT.P4_p": ["INIT.P4_11_p", "INIT.P4_12_p", "INIT.P4_13_p", "INIT.P4_14_p", "INIT.P4_15_p", "INIT.P4_16_p", "INIT.P4_17_p", "INIT.P4_18_p", "INIT.P4_19_p", "INIT.P4_20_p"], + "INIT.P4_Chl": ["INIT.P4_11_Chl", "INIT.P4_12_Chl", "INIT.P4_13_Chl", "INIT.P4_14_Chl", "INIT.P4_15_Chl", "INIT.P4_16_Chl", "INIT.P4_17_Chl", "INIT.P4_18_Chl", "INIT.P4_19_Chl", "INIT.P4_20_Chl"], + "INIT.P2_c": ["INIT.P2_4_c", "INIT.P2_5_c", "INIT.P2_6_c", "INIT.P2_7_c", "INIT.P2_8_c", "INIT.P2_9_c", "INIT.P2_10_c", "INIT.P2_11_c", "INIT.P2_12_c", "INIT.P2_13_c","INIT.P5_6_c", "INIT.P5_7_c", "INIT.P5_8_c", "INIT.P5_9_c", "INIT.P5_10_c", "INIT.P5_11_c", "INIT.P5_12_c", "INIT.P5_13_c", "INIT.P5_14_c", "INIT.P5_15_c","INIT.P7_2_c", "INIT.P7_3_c", "INIT.P7_4_c", "INIT.P7_5_c", "INIT.P7_6_c", "INIT.P7_7_c","INIT.P8_2_c", "INIT.P8_3_c", "INIT.P8_4_c", "INIT.P8_5_c", "INIT.P8_6_c", "INIT.P8_7_c"], + "INIT.P2_n": ["INIT.P2_4_n", "INIT.P2_5_n", "INIT.P2_6_n", "INIT.P2_7_n", "INIT.P2_8_n", "INIT.P2_9_n", "INIT.P2_10_n", "INIT.P2_11_n", "INIT.P2_12_n", "INIT.P2_13_n","INIT.P5_6_n", "INIT.P5_7_n", "INIT.P5_8_n", "INIT.P5_9_n", "INIT.P5_10_n", "INIT.P5_11_n", "INIT.P5_12_n", "INIT.P5_13_n", "INIT.P5_14_n", "INIT.P5_15_n","INIT.P7_2_n", "INIT.P7_3_n", "INIT.P7_4_n", "INIT.P7_5_n", "INIT.P7_6_n", "INIT.P7_7_n","INIT.P8_2_n", "INIT.P8_3_n", "INIT.P8_4_n", "INIT.P8_5_n", "INIT.P8_6_n", "INIT.P8_7_n"], + "INIT.P2_p": ["INIT.P2_4_p", "INIT.P2_5_p", "INIT.P2_6_p", "INIT.P2_7_p", "INIT.P2_8_p", "INIT.P2_9_p", "INIT.P2_10_p", "INIT.P2_11_p", "INIT.P2_12_p", "INIT.P2_13_p","INIT.P5_6_p", "INIT.P5_7_p", "INIT.P5_8_p", "INIT.P5_9_p", "INIT.P5_10_p", "INIT.P5_11_p", "INIT.P5_12_p", "INIT.P5_13_p", "INIT.P5_14_p", "INIT.P5_15_p","INIT.P7_2_p", "INIT.P7_3_p", "INIT.P7_4_p", "INIT.P7_5_p", "INIT.P7_6_p", "INIT.P7_7_p","INIT.P8_2_p", "INIT.P8_3_p", "INIT.P8_4_p", "INIT.P8_5_p", "INIT.P8_6_p", "INIT.P8_7_p"], + "INIT.P2_Chl": ["INIT.P2_4_Chl", "INIT.P2_5_Chl", "INIT.P2_6_Chl", "INIT.P2_7_Chl", "INIT.P2_8_Chl", "INIT.P2_9_Chl", "INIT.P2_10_Chl", "INIT.P2_11_Chl", "INIT.P2_12_Chl", "INIT.P2_13_Chl","INIT.P5_6_Chl", "INIT.P5_7_Chl", "INIT.P5_8_Chl", "INIT.P5_9_Chl", "INIT.P5_10_Chl", "INIT.P5_11_Chl", "INIT.P5_12_Chl", "INIT.P5_13_Chl", "INIT.P5_14_Chl", "INIT.P5_15_Chl","INIT.P7_2_Chl", "INIT.P7_3_Chl", "INIT.P7_4_Chl", "INIT.P7_5_Chl", "INIT.P7_6_Chl", "INIT.P7_7_Chl","INIT.P8_2_Chl", "INIT.P8_3_Chl", "INIT.P8_4_Chl", "INIT.P8_5_Chl", "INIT.P8_6_Chl", "INIT.P8_7_Chl"], + "INIT.P3_c": ["INIT.P3_0_c", "INIT.P3_1_c", "INIT.P3_2_c","INIT.P9_m2_c", "INIT.P9_m1_c", "INIT.P9_0_c","INIT.P6_m4_c", "INIT.P6_m3_c"], + "INIT.P3_n": ["INIT.P3_0_n", "INIT.P3_1_n", "INIT.P3_2_n","INIT.P9_m2_n", "INIT.P9_m1_n", "INIT.P9_0_n","INIT.P6_m4_n", "INIT.P6_m3_n"], + "INIT.P3_p": ["INIT.P3_0_p", "INIT.P3_1_p", "INIT.P3_2_p","INIT.P9_m2_p", "INIT.P9_m1_p", "INIT.P9_0_p","INIT.P6_m4_p", "INIT.P6_m3_p"], + "INIT.P3_Chl": ["INIT.P3_0_Chl", "INIT.P3_1_Chl", "INIT.P3_2_Chl","INIT.P9_m2_Chl", "INIT.P9_m1_Chl", "INIT.P9_0_Chl","INIT.P6_m4_Chl", "INIT.P6_m3_Chl"], + "INIT.Z6_c": ["INIT.Z6_5_c", "INIT.Z6_6_c", "INIT.Z6_7_c", "INIT.Z6_8_c", "INIT.Z6_9_c", "INIT.Z6_10_c", "INIT.Z6_11_c"], + "INIT.Z6_n": ["INIT.Z6_5_n", "INIT.Z6_6_n", "INIT.Z6_7_n", "INIT.Z6_8_n", "INIT.Z6_9_n", "INIT.Z6_10_n", "INIT.Z6_11_n"], + "INIT.Z6_p": ["INIT.Z6_5_p", "INIT.Z6_6_p", "INIT.Z6_7_p", "INIT.Z6_8_p", "INIT.Z6_9_p", "INIT.Z6_10_p", "INIT.Z6_11_p"], + "INIT.Z5_c": ["INIT.Z5_9_c", "INIT.Z5_10_c", "INIT.Z5_11_c", "INIT.Z5_12_c", "INIT.Z5_13_c", "INIT.Z5_14_c", "INIT.Z5_15_c", "INIT.Z5_16_c", "INIT.Z5_17_c", "INIT.Z5_18_c"], + "INIT.Z5_n": ["INIT.Z5_9_n", "INIT.Z5_10_n", "INIT.Z5_11_n", "INIT.Z5_12_n", "INIT.Z5_13_n", "INIT.Z5_14_n", "INIT.Z5_15_n", "INIT.Z5_16_n", "INIT.Z5_17_n", "INIT.Z5_18_n"], + "INIT.Z5_p": ["INIT.Z5_9_p", "INIT.Z5_10_p", "INIT.Z5_11_p", "INIT.Z5_12_p", "INIT.Z5_13_p", "INIT.Z5_14_p", "INIT.Z5_15_p", "INIT.Z5_16_p", "INIT.Z5_17_p", "INIT.Z5_18_p"], + "INIT.Z4_c": ["INIT.Z4_15_c", "INIT.Z4_16_c", "INIT.Z4_17_c", "INIT.Z4_18_c", "INIT.Z4_19_c", "INIT.Z4_20_c", "INIT.Z4_21_c", "INIT.Z4_22_c", "INIT.Z4_23_c", "INIT.Z4_24_c"], + "INIT.Z4_n": ["INIT.Z4_15_n", "INIT.Z4_16_n", "INIT.Z4_17_n", "INIT.Z4_18_n", "INIT.Z4_19_n", "INIT.Z4_20_n", "INIT.Z4_21_n", "INIT.Z4_22_n", "INIT.Z4_23_n", "INIT.Z4_24_n"], + "INIT.Z4_p": ["INIT.Z4_15_p", "INIT.Z4_16_p", "INIT.Z4_17_p", "INIT.Z4_18_p", "INIT.Z4_19_p", "INIT.Z4_20_p", "INIT.Z4_21_p", "INIT.Z4_22_p", "INIT.Z4_23_p", "INIT.Z4_24_p"], + "INIT.Z3_c": ["INIT.Z3_22_c", "INIT.Z3_23_c", "INIT.Z3_24_c", "INIT.Z3_25_c", "INIT.Z3_26_c", "INIT.Z3_27_c", "INIT.Z3_28_c", "INIT.Z3_29_c", "INIT.Z3_30_c", "INIT.Z3_31_c"], + "INIT.Z3_n": ["INIT.Z3_22_n", "INIT.Z3_23_n", "INIT.Z3_24_n", "INIT.Z3_25_n", "INIT.Z3_26_n", "INIT.Z3_27_n", "INIT.Z3_28_n", "INIT.Z3_29_n", "INIT.Z3_30_n", "INIT.Z3_31_n"], + "INIT.Z3_p": ["INIT.Z3_22_p", "INIT.Z3_23_p", "INIT.Z3_24_p", "INIT.Z3_25_p", "INIT.Z3_26_p", "INIT.Z3_27_p", "INIT.Z3_28_p", "INIT.Z3_29_p", "INIT.Z3_30_p", "INIT.Z3_31_p"] } def read_values(filepath): @@ -92,4 +125,4 @@ def main(): print(f"Errore scrivendo {outfile}: {e}") if __name__ == "__main__": - main() \ No newline at end of file + main() From 39ea73547b4562bfa68e0f1bafc7da17c6f4b07c Mon Sep 17 00:00:00 2001 From: Marco-Puglia Date: Thu, 23 Apr 2026 10:55:40 +0200 Subject: [PATCH 85/97] Added the mapping dictionary creator --- testcase/create_mapping_dictionary.py | 138 ++++++++++++++++++++++++++ 1 file changed, 138 insertions(+) create mode 100644 testcase/create_mapping_dictionary.py diff --git a/testcase/create_mapping_dictionary.py b/testcase/create_mapping_dictionary.py new file mode 100644 index 00000000..21c245bf --- /dev/null +++ b/testcase/create_mapping_dictionary.py @@ -0,0 +1,138 @@ +import re +import os +from collections import Counter + +# Choose the file and path +yaml_file_path = "fabm.yaml" + +############# FUNCTION ################### +def generate_mapping(file_path): + if not os.path.exists(file_path): + print(f"Error: File '{file_path}' not found.") + return + + # 1. Extract all the environment variables and size classes (eg. N5, B1_m5, P2_4, Z3, etc.) + pattern = re.compile(r' (O3h|[NORXBPZ][0-9](?:_[A-Za-z0-9]{1,2})?):') # [WARNING#1] Use "O3h|" to catch the specific exception, duplicates are filtered below + + # Initialize the list and the set + items = ["depth"] # [WARNING#2] Hardcoded "depth" since it is not defined in the .yaml files + seen = set(["depth"]) + + with open(file_path, 'r') as f: + for line in f: + match = pattern.search(line) + if match: + val = match.group(1) + if val not in seen: # Check for duplicate entries + items.append(val) # Append the new entry to the list + seen.add(val) # Add the new entry to the set + + if len(items) == 1: # Only "depth" is in there + print("No matching identifiers found in the YAML file.") + return + + summary = Counter(item[0] for item in items) + + # Print the summary + print("--- Summary ---") + for key in sorted(summary.keys()): + print(f"{key}: {summary[key]}") + print(f"TOTAL: {len(items)}") + print("=============================") + + # Print all the founded types + print("--- Extracted Types ---") + for item in items: + print(f"- {item}") + print("=============================") + + + # 2. Group the environment variables and size classes by their main definition (e.g., N, B1, P4, Z3) + groups = {} + for item in items: + family = item.split('_')[0] + if family not in groups: + groups[family] = [] + groups[family].append(item) + + print("--- Sorted Groups ---") + for group in groups.items(): + print(f"- {group}") + print("=============================") + + + # 3. Build the mapping dictionary + mapping = {} + + # Suffix map for environment variables + env_suffixes = { + 'N1': ['p'], 'N3': ['n'], 'N4': ['n'], 'N5': ['s'], 'N6': ['r'], + 'O2': ['o'], 'O3': ['c'], 'O3h': ['h'], 'O4': ['n'], 'O5': ['c'], + 'R1': ['c', 'n', 'p', 's'], + 'R2': ['c'], + 'R3': ['c'], + 'R6': ['c', 'n', 'p', 's'], + 'R8': ['c', 'n', 'p', 's'], + 'X1': ['c'], 'X2': ['c'], 'X3': ['c'] + } + + # Define the phytoplankton exceptions (P3-P6-P9, P2-P5-P7-P8) for the dictionary's framework + merger_map = { + 'P6': 'P3', + 'P9': 'P3', + 'P5': 'P2', + 'P7': 'P2', + 'P8': 'P2' + } + + # Loop on all the state variables + mapping["INIT.depth"] = ["INIT.depth"] + for family, members in groups.items(): + # Environment state variables + if family in env_suffixes: + for suffix in env_suffixes[family]: + key = f"INIT.{family}_{suffix}" + if key not in mapping: mapping[key] = [] + mapping[key].extend([f"INIT.{m}_{suffix}" for m in members]) + else: + + # Organism state variables + target_family = merger_map.get(family, family) + if family.startswith('B'): + suffixes = ['c', 'n', 'p'] + elif family.startswith('P'): + suffixes = ['c', 'n', 'p', 'Chl'] + if family == 'P1' or target_family == 'P1': # Apply the 's' (si) for P1 (diatoms) + suffixes.append('s') + elif family.startswith('Z'): + suffixes = ['c', 'n', 'p'] + else: + continue + + for suffix in suffixes: + key = f"INIT.{target_family}_{suffix}" + if key not in mapping: + mapping[key] = [] + + formatted_members = [f"INIT.{m}_{suffix}" for m in members] + mapping[key].extend(formatted_members) + + + # 4. Print the mapping dictionary + print("--- Mapping Dictionary ---") + print("mapping = {") + keys = list(mapping.keys()) + if keys: + max_key_len = max(len(key) for key in keys) + 1 + for i, key in enumerate(keys): + key_print = f'"{key}":' + padding = " " * (max_key_len - len(key_print) + 3) + value_print = ", ".join(f'"{v}"' for v in mapping[key]) + comma = "," if i < len(keys) - 1 else "" + print(f' {key_print}{padding}[{value_print}]{comma}') + + print("}") + + +############# RUN ############# +generate_mapping(yaml_file_path) \ No newline at end of file From e6e2d2f24efed438f64e08f8e1c73b8b984484b4 Mon Sep 17 00:00:00 2001 From: Paolo Lazzari Date: Thu, 23 Apr 2026 11:19:05 +0200 Subject: [PATCH 86/97] code cleaning --- src/BIO/trcbio_fabm.F90 | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/BIO/trcbio_fabm.F90 b/src/BIO/trcbio_fabm.F90 index cda6e411..04936470 100644 --- a/src/BIO/trcbio_fabm.F90 +++ b/src/BIO/trcbio_fabm.F90 @@ -102,6 +102,7 @@ SUBROUTINE trcbio_fabm(datestring) write(*,*) 'surface_specific_humidity',surface_specific_humidity(:,:) write(*,*) 't2m',t2m(:,:) write(*,*) 'sp',sp(:,:) +write(*,*) 'surface_downwelling_shortwave_flux',surface_downwelling_shortwave_flux(:,:) ! In the loops below, dy and w are local to the j,k point being processed. ! They would therefore need to be processed further within the loop to be included in @@ -124,6 +125,13 @@ SUBROUTINE trcbio_fabm(datestring) ! Compute any remaining diagnostics call model_fabm%finalize_outputs() +DO jn=1,size(model_fabm%interior_state_variables) + write(*,*) 'jn=', jn + write(*,*) 'Name of diagnostic variable:', TRIM(model_fabm%interior_state_variables(jn)%name) + write(*,*) 'Value of ogstm_sedipi(3,5,5,jn): ', ogstm_sedipi(3,5,5,jn) + +ENDDO + DO jn=1,size(model_fabm%interior_diagnostic_variables) IF (model_fabm%interior_diagnostic_variables(jn)%save) THEN @@ -161,7 +169,6 @@ SUBROUTINE trcbio_fabm(datestring) END IF END DO - ! ---------------------------------------------------------------------- ! BEGIN BC_REFACTORING SECTION ! --------------------------------------------------------------------- From 9ebd327725782247690708dd9bf909298985b27b Mon Sep 17 00:00:00 2001 From: Paolo Lazzari Date: Thu, 23 Apr 2026 11:19:42 +0200 Subject: [PATCH 87/97] code cleaning --- src/BIO/trcbio_fabm.F90 | 49 +---------------------------------------- 1 file changed, 1 insertion(+), 48 deletions(-) diff --git a/src/BIO/trcbio_fabm.F90 b/src/BIO/trcbio_fabm.F90 index 04936470..83719ba5 100644 --- a/src/BIO/trcbio_fabm.F90 +++ b/src/BIO/trcbio_fabm.F90 @@ -82,27 +82,6 @@ SUBROUTINE trcbio_fabm(datestring) !call model_fabm%link_scalar(fabm_standard_variables%number_of_days_since_start_of_the_year, yearday) call model_fabm%prepare_inputs(SEC_FROM_START(datestring),year,month,day,sec) -write(*,*) 'yearday: ', yearday -write(*,*) 'SEC_FROM_START: ', SEC_FROM_START(datestring) -write(*,*) 'year, month, day, sec: ', year, month, day, sec - -write(*,*) 'tn',tn(1,:,:) -write(*,*) 'sn',sn(1,:,:) -write(*,*) 'rho',rho(1,:,:) -write(*,*) 'gdept',gdept(1,:,:) -write(*,*) 'mole_fraction_of_carbon_dioxide_in_air',ogstm_co2(:,:) -write(*,*) 'e3t',e3t(1,:,:) -write(*,*) 'vatm',vatm(:,:) -write(*,*) 'glamt',glamt(:,:) -write(*,*) 'tcc',tcc(:,:) -write(*,*) 'tclw',tclw(:,:) -write(*,*) 'atmosphere_mass_content_of_water_vapor',atmosphere_mass_content_of_water_vapor(:,:) -write(*,*) 'visibility_in_air',visibility_in_air(:,:) -write(*,*) 'aerosol_air_mass_type',aerosol_air_mass_type(:,:) -write(*,*) 'surface_specific_humidity',surface_specific_humidity(:,:) -write(*,*) 't2m',t2m(:,:) -write(*,*) 'sp',sp(:,:) -write(*,*) 'surface_downwelling_shortwave_flux',surface_downwelling_shortwave_flux(:,:) ! In the loops below, dy and w are local to the j,k point being processed. ! They would therefore need to be processed further within the loop to be included in @@ -125,47 +104,21 @@ SUBROUTINE trcbio_fabm(datestring) ! Compute any remaining diagnostics call model_fabm%finalize_outputs() -DO jn=1,size(model_fabm%interior_state_variables) - write(*,*) 'jn=', jn - write(*,*) 'Name of diagnostic variable:', TRIM(model_fabm%interior_state_variables(jn)%name) - write(*,*) 'Value of ogstm_sedipi(3,5,5,jn): ', ogstm_sedipi(3,5,5,jn) - -ENDDO - DO jn=1,size(model_fabm%interior_diagnostic_variables) IF (model_fabm%interior_diagnostic_variables(jn)%save) THEN tra_DIA(jn)%data = model_fabm%get_interior_diagnostic_data(jn) - if (jn==11) THEN - write(*,*) 'jn=', jn - write(*,*) 'Name of diagnostic variable:', TRIM(model_fabm%interior_diagnostic_variables(jn)%name) - write(*,*) 'Shape of get_interior_diagnostic_data(jn):', shape(model_fabm%get_interior_diagnostic_data(jn)) - write(*,*) 'Shape of tra_DIA(jn,:,:,:):', shape(tra_DIA(jn)%data(:,:,:)) - do jk=1, jpk - write(*,*) 'Value of tra_DIA(jn,:,:,:):', tra_DIA(jn)%data(jk,:,:) - enddo - endif - END IF END DO DO jn=1,size(model_fabm%horizontal_diagnostic_variables) IF (model_fabm%horizontal_diagnostic_variables(jn)%save) THEN -! write(*,*) 'jn=', jn -! write(*,*) 'Name of diagnostic variable:', TRIM(model_fabm%horizontal_diagnostic_variables(jn)%name) -! write(*,*) 'Shape of get_horizontal_diagnostic_data(jn):', shape(model_fabm%get_horizontal_diagnostic_data(jn)) -! write(*,*) 'Shape of tra_DIA_2d(jn,:,:):', shape(tra_DIA_2d(jn)%data(:,:)) tra_DIA_2d(jn)%data = model_fabm%get_horizontal_diagnostic_data(jn) - ! write(*,*) 'Value of tra_DIA_2d(jn,:,:):', tra_DIA_2d(jn)%data(5,5) - write(*,*) 'jn=', jn - write(*,*) 'Name of diagnostic variable:', TRIM(model_fabm%horizontal_diagnostic_variables(jn)%name) - write(*,*) 'Shape of get_horizontal_diagnostic_data(jn):', shape(model_fabm%get_horizontal_diagnostic_data(jn)) - write(*,*) 'Shape of tra_DIA_2d(jn,:,:):', shape(tra_DIA_2d(jn)%data(:,:)) - write(*,*) 'Value of tra_DIA_2d(jn,:,:):', tra_DIA_2d(jn)%data(:,:) + END IF END DO From e6465d9c6e293c61aee2d50433dbae0bf680c0a0 Mon Sep 17 00:00:00 2001 From: Marco-Puglia Date: Fri, 24 Apr 2026 09:50:26 +0200 Subject: [PATCH 88/97] Added bgc_error.py to house shared error logic and edited the relative files --- testcase/bgc_error.py | 7 +++++++ testcase/create_bc_nc.py | 13 ++++++------- testcase/create_init_nc.py | 8 ++++---- testcase/deploy_code.py | 8 ++++---- 4 files changed, 21 insertions(+), 15 deletions(-) create mode 100644 testcase/bgc_error.py diff --git a/testcase/bgc_error.py b/testcase/bgc_error.py new file mode 100644 index 00000000..3de52795 --- /dev/null +++ b/testcase/bgc_error.py @@ -0,0 +1,7 @@ +import sys + +def raise_bgc_error(received_type): + + valid_types = "[DEFAULT[Default,default], BFM[bfm], FABM-BFM[fabm-bfm]]" + print(f"[ERROR] BGC_TYPE='{received_type}' is wrong/undefined. Expected one of: {valid_types}") + sys.exit() \ No newline at end of file diff --git a/testcase/create_bc_nc.py b/testcase/create_bc_nc.py index 67d5ea8e..51da48f7 100644 --- a/testcase/create_bc_nc.py +++ b/testcase/create_bc_nc.py @@ -4,6 +4,8 @@ from mydtype import * +from bgc_error import raise_bgc_error + import scipy.io.netcdf as NC import pickle @@ -87,8 +89,7 @@ def create_bc_nc(test): ncvar = ncOUT.createVariable('reP1_DW' ,'d',('time','z','y','x') ); ncvar[:] = D3*0.; ncvar = ncOUT.createVariable('reZ1_DWz' ,'d',('time','z','y','x') ); ncvar[:] = D3*0.; else: - print("[ERROR] BGC_TYPE='" + test['BGC_TYPE'].decode() + "' is wrong/undefined. Expected one of: [DEFAULT[Default,default], BFM[bfm], FABM-BFM[fabm-bfm]]") - sys.exit() + raise_bgc_error(test['BGC_TYPE'].decode()) ncvar = ncOUT.createVariable('index' ,'i',('time','z','y','x') ); ncvar[:] = index; ncvar = ncOUT.createVariable('index_inv' ,'i',('waterpoints','dim3')); ncvar[:] = index_inv; @@ -142,9 +143,8 @@ def create_bc_nc(test): ncvar = ncOUT.createVariable('atm_P1_DW' ,'f',('lat','lon') ); ncvar[:] = 0.0; ncvar = ncOUT.createVariable('atm_Z1_DWz' ,'f',('lat','lon') ); ncvar[:] = 0.0; else: - print("[ERROR] BGC_TYPE='" + test['BGC_TYPE'].decode() + "' is wrong/undefined. Expected one of: [DEFAULT[Default,default], BFM[bfm], FABM-BFM[fabm-bfm]]") - sys.exit() - + raise_bgc_error(test['BGC_TYPE'].decode()) + ncOUT.close() # Atmosphere CO2 @@ -242,8 +242,7 @@ def create_bc_nc(test): ncvar = ncOUT.createVariable('riv_P1_DW' ,'d',('riv_idxt',) ); ncvar[:] = 0.0; ncvar = ncOUT.createVariable('riv_Z1_DWz' ,'d',('riv_idxt',) ); ncvar[:] = 0.0; else: - print("[ERROR] BGC_TYPE='" + test['BGC_TYPE'].decode() + "' is wrong/undefined. Expected one of: [DEFAULT[Default,default], BFM[bfm], FABM-BFM[fabm-bfm]]") - sys.exit() + raise_bgc_error(test['BGC_TYPE'].decode()) ncOUT.close() diff --git a/testcase/create_init_nc.py b/testcase/create_init_nc.py index 4b64dd0a..d88de10a 100644 --- a/testcase/create_init_nc.py +++ b/testcase/create_init_nc.py @@ -4,6 +4,8 @@ from mydtype import * +from bgc_error import raise_bgc_error + import scipy.io.netcdf as NC import pickle @@ -45,8 +47,7 @@ def create_init_nc(test): print(f" {variable.name} = {variable.long_name} ({variable.units})") initVARS.append(variable.name) else: - print("[ERROR] BGC_TYPE='" + test['BGC_TYPE'].decode() + "' is wrong/undefined. Expected one of: [DEFAULT[Default,default], BFM[bfm], FABM-BFM[fabm-bfm]]") - sys.exit() + raise_bgc_error(test['BGC_TYPE'].decode()) jpi=test['jpi']; jpj=test['jpj']; @@ -86,8 +87,7 @@ def create_init_nc(test): var=var.replace('/','_') filename = "KB/INIT_NWM_KB_FABM_ROSENMCARTUR/INIT." + var else: - print("[ERROR] BGC_TYPE='" + test['BGC_TYPE'].decode() + "' is wrong/undefined. Expected one of: [DEFAULT[Default,default], BFM[bfm], FABM-BFM[fabm-bfm]]") - sys.exit() + raise_bgc_error(test['BGC_TYPE'].decode()) din = np.loadtxt(filename) datain = interpolate(din, jpk) diff --git a/testcase/deploy_code.py b/testcase/deploy_code.py index 53be260e..ac292363 100644 --- a/testcase/deploy_code.py +++ b/testcase/deploy_code.py @@ -4,6 +4,8 @@ from mydtype import * +from bgc_error import raise_bgc_error + import scipy.io.netcdf as NC import pickle @@ -73,7 +75,5 @@ def deploy_code(test): os.system("python create_ogstm_yaml.py") os.system("cp -pf ogstm.yaml " + test['Dir'].decode() + "/ogstm.yaml") else: - - print("[ERROR] BGC_TYPE='" + test['BGC_TYPE'].decode() + "' is wrong/undefined. Expected one of: [DEFAULT[Default,default], BFM[bfm], FABM-BFM[fabm-bfm]]") - sys.exit() - + + raise_bgc_error(test['BGC_TYPE'].decode()) From b8c266eb2055c58783137e37da107d23ecf75401 Mon Sep 17 00:00:00 2001 From: Paolo Lazzari Date: Tue, 28 Apr 2026 11:07:15 +0200 Subject: [PATCH 89/97] Bug fix on buondary conditions index i->j --- src/BC/hard_open.f90 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/BC/hard_open.f90 b/src/BC/hard_open.f90 index f01fd245..ae1f6211 100644 --- a/src/BC/hard_open.f90 +++ b/src/BC/hard_open.f90 @@ -544,7 +544,7 @@ subroutine apply_dirichlet(self) ! 2nd loop: provided variables on neighbors do j = 1, self%m_size - idx_i = self%m_neighbors(1, i) + idx_i = self%m_neighbors(1, j) idx_j = self%m_neighbors(2, j) idx_k = self%m_neighbors(3, j) From dccf89a6b586a976828d1f9a5828cba744479e67 Mon Sep 17 00:00:00 2001 From: Paolo Lazzari Date: Tue, 28 Apr 2026 11:22:47 +0200 Subject: [PATCH 90/97] update python script with BFM98 --- testcase/create_init_nc.py | 18 ++++++++++++++++-- testcase/deploy_code.py | 20 +++++++++++++++++++- 2 files changed, 35 insertions(+), 3 deletions(-) diff --git a/testcase/create_init_nc.py b/testcase/create_init_nc.py index 4b64dd0a..04502502 100644 --- a/testcase/create_init_nc.py +++ b/testcase/create_init_nc.py @@ -34,6 +34,17 @@ def create_init_nc(test): for variable in model.state_variables: print(f" {variable.name} = {variable.long_name} ({variable.units})") initVARS.append(variable.name) + elif test['BGC_TYPE'].decode() in ['FABM-BFM98','fabm-bfm98']: + import pyfabm + CODEPATH = test['Code'].decode() + CODEPATH = CODEPATH.replace("~",os.getenv("HOME")) + fabm_yaml= CODEPATH + "/fabm/extern/ogs/fabm_diatoms_60PFTs_no_repr.yaml " + fabm_yaml ="/g100_work/OGS23_PRACE_IT/plazzari/ModelBuild/ogstm/testcase/TEST02/wrkdir/MODEL/fabm.yaml" + model = pyfabm.Model(fabm_yaml) + initVARS=[] + for variable in model.state_variables: + print(f" {variable.name} = {variable.long_name} ({variable.units})") + initVARS.append(variable.name) elif test['BGC_TYPE'].decode() in ['FABM-ROSENMCARTUR','fabm-rosenmcartur']: import pyfabm CODEPATH = test['Code'].decode() @@ -45,7 +56,7 @@ def create_init_nc(test): print(f" {variable.name} = {variable.long_name} ({variable.units})") initVARS.append(variable.name) else: - print("[ERROR] BGC_TYPE='" + test['BGC_TYPE'].decode() + "' is wrong/undefined. Expected one of: [DEFAULT[Default,default], BFM[bfm], FABM-BFM[fabm-bfm]]") + print("[ERROR] BGC_TYPE='" + test['BGC_TYPE'].decode() + "' is wrong/undefined. Expected one of: [DEFAULT[Default,default], BFM[bfm], FABM-BFM[fabm-bfm], 'FABM-BFM98'['fabm-bfm98']]") sys.exit() jpi=test['jpi']; @@ -82,11 +93,14 @@ def create_init_nc(test): elif test['BGC_TYPE'].decode() in ['FABM-BFM','fabm-bfm']: var=var.replace('/','_') filename = "KB/INIT_NWM_KB_FABM/INIT." + var + elif test['BGC_TYPE'].decode() in ['FABM-BFM98','fabm-bfm98']: + var=var.replace('/','_') + filename = "KB/INIT_NWM_KB_FABM98/INIT." + var elif test['BGC_TYPE'].decode() in ['FABM-ROSENMCARTUR','fabm-rosenmcartur']: var=var.replace('/','_') filename = "KB/INIT_NWM_KB_FABM_ROSENMCARTUR/INIT." + var else: - print("[ERROR] BGC_TYPE='" + test['BGC_TYPE'].decode() + "' is wrong/undefined. Expected one of: [DEFAULT[Default,default], BFM[bfm], FABM-BFM[fabm-bfm]]") + print("[ERROR] BGC_TYPE='" + test['BGC_TYPE'].decode() + "' is wrong/undefined. Expected one of: [DEFAULT[Default,default], BFM[bfm], FABM-BFM[fabm-bfm], 'FABM-BFM98'['fabm-bfm98']]") sys.exit() din = np.loadtxt(filename) diff --git a/testcase/deploy_code.py b/testcase/deploy_code.py index 53be260e..30697be5 100644 --- a/testcase/deploy_code.py +++ b/testcase/deploy_code.py @@ -55,6 +55,24 @@ def deploy_code(test): os.system("python create_ogstm_yaml.py") os.system("cp -pf ogstm.yaml " + test['Dir'].decode() + "/ogstm.yaml") + elif test['BGC_TYPE'].decode() in ['FABM-BFM98','fabm-bfm98']: + os.system("cp -pf namelist.init.fabm " + test['Dir'].decode() + "/namelist.init") + + namelist_optics = CODEPATH + "/ogstm/ready_for_model_namelists/namelist.optics " + os.system("cp -pf " + namelist_optics + test['Dir'].decode() + "/") + + namelist_phys = CODEPATH + "/ogstm/ready_for_model_namelists/namelist.phys " + os.system("cp -pf " + namelist_phys + test['Dir'].decode() + "/") + + fabm_yaml= CODEPATH + "/fabm/extern/ogs/fabm_diatoms_60PFTs_no-repr.yaml " + os.system("cp -pf " + fabm_yaml + test['Dir'].decode() + "/fabm.yaml") + + ret = os.system("cp -pf ogstm.yaml " + test['Dir'].decode() + "/ogstm.yaml") + if ret != 0: + print("ogstm.yaml not found, creating template...") + os.system("python create_ogstm_yaml.py") + os.system("cp -pf ogstm.yaml " + test['Dir'].decode() + "/ogstm.yaml") + elif test['BGC_TYPE'].decode() in ['FABM-ROSENMCARTUR','fabm-rosenmcartur']: os.system("cp -pf namelist.init.fabm " + test['Dir'].decode() + "/namelist.init") @@ -74,6 +92,6 @@ def deploy_code(test): os.system("cp -pf ogstm.yaml " + test['Dir'].decode() + "/ogstm.yaml") else: - print("[ERROR] BGC_TYPE='" + test['BGC_TYPE'].decode() + "' is wrong/undefined. Expected one of: [DEFAULT[Default,default], BFM[bfm], FABM-BFM[fabm-bfm]]") + print("[ERROR] BGC_TYPE='" + test['BGC_TYPE'].decode() + "' is wrong/undefined. Expected one of: [DEFAULT[Default,default], BFM[bfm], FABM-BFM[fabm-bfm], 'FABM-BFM98'['fabm-bfm98']]") sys.exit() From fd217584b74f028c42a35d2423811821c0a6cc1f Mon Sep 17 00:00:00 2001 From: Marco-Puglia Date: Wed, 13 May 2026 17:06:15 +0200 Subject: [PATCH 91/97] new create_RESTARTS98.py file --- testcase/create_RESTART98.py | 117 +++++++++++++++++++++++++++++++++++ 1 file changed, 117 insertions(+) create mode 100644 testcase/create_RESTART98.py diff --git a/testcase/create_RESTART98.py b/testcase/create_RESTART98.py new file mode 100644 index 00000000..f506d857 --- /dev/null +++ b/testcase/create_RESTART98.py @@ -0,0 +1,117 @@ +#!/usr/bin/env python3 +import os +from pathlib import Path +import netCDF4 as nc +import numpy as np + +# Prefisso e cartella di input/output +file_prefix = "RST.20190101-00:00:00." +input_dir = Path("/RESTARTS/") +output_dir = Path("/RESTARTS98/") +output_dir.mkdir(exist_ok=True) + +# Dizionario di mapping: +# chiave = nome file originale +# valore = lista dei nuovi file da creare +mapping = { + "N1_p": ["N1_p"], + "N3_n": ["N3_n"], + "N4_n": ["N4_n"], + "N5_s": ["N5_s"], + "N6_r": ["N6_r"], + "O2_o": ["O2_o"], + "O3_c": ["O3_c"], + "O3h_h": ["O3h_h"], + "O4_n": ["O4_n"], + "O5_c": ["O5_c"], + "R1_c": ["R1_c"], + "R1_n": ["R1_n"], + "R1_p": ["R1_p"], + "R1_s": ["R1_s"], + "R2_c": ["R2_c"], + "R3_c": ["R3_c"], + "R6_c": ["R6_c"], + "R6_n": ["R6_n"], + "R6_p": ["R6_p"], + "R6_s": ["R6_s"], + "R8_c": ["R8_c"], + "R8_n": ["R8_n"], + "R8_p": ["R8_p"], + "R8_s": ["R8_s"], + "X1_c": ["X1_c"], + "X2_c": ["X2_c"], + "X3_c": ["X3_c"], + "B1_c": ["B1_m5_c"], + "B1_n": ["B1_m5_n"], + "B1_p": ["B1_m5_p"], + "P1_c": ["P1_11_c", "P1_12_c", "P1_13_c", "P1_14_c", "P1_15_c", "P1_16_c", "P1_17_c", "P1_18_c", "P1_19_c", "P1_20_c"], + "P1_n": ["P1_11_n", "P1_12_n", "P1_13_n", "P1_14_n", "P1_15_n", "P1_16_n", "P1_17_n", "P1_18_n", "P1_19_n", "P1_20_n"], + "P1_p": ["P1_11_p", "P1_12_p", "P1_13_p", "P1_14_p", "P1_15_p", "P1_16_p", "P1_17_p", "P1_18_p", "P1_19_p", "P1_20_p"], + "P1_Chl": ["P1_11_Chl", "P1_12_Chl", "P1_13_Chl", "P1_14_Chl", "P1_15_Chl", "P1_16_Chl", "P1_17_Chl", "P1_18_Chl", "P1_19_Chl", "P1_20_Chl"], + "P1_s": ["P1_11_s", "P1_12_s", "P1_13_s", "P1_14_s", "P1_15_s", "P1_16_s", "P1_17_s", "P1_18_s", "P1_19_s", "P1_20_s"], + "P4_c": ["P4_11_c", "P4_12_c", "P4_13_c", "P4_14_c", "P4_15_c", "P4_16_c", "P4_17_c", "P4_18_c", "P4_19_c", "P4_20_c"], + "P4_n": ["P4_11_n", "P4_12_n", "P4_13_n", "P4_14_n", "P4_15_n", "P4_16_n", "P4_17_n", "P4_18_n", "P4_19_n", "P4_20_n"], + "P4_p": ["P4_11_p", "P4_12_p", "P4_13_p", "P4_14_p", "P4_15_p", "P4_16_p", "P4_17_p", "P4_18_p", "P4_19_p", "P4_20_p"], + "P4_Chl": ["P4_11_Chl", "P4_12_Chl", "P4_13_Chl", "P4_14_Chl", "P4_15_Chl", "P4_16_Chl", "P4_17_Chl", "P4_18_Chl", "P4_19_Chl", "P4_20_Chl"], + "P2_c": ["P2_4_c", "P2_5_c", "P2_6_c", "P2_7_c", "P2_8_c", "P2_9_c", "P2_10_c", "P2_11_c", "P2_12_c", "P2_13_c", "P5_6_c", "P5_7_c", "P5_8_c", "P5_9_c", "P5_10_c", "P5_11_c", "P5_12_c", "P5_13_c", "P5_14_c", "P5_15_c", "P7_2_c", "P7_3_c", "P7_4_c", "P7_5_c", "P7_6_c", "P7_7_c", "P8_2_c", "P8_3_c", "P8_4_c", "P8_5_c", "P8_6_c", "P8_7_c"], + "P2_n": ["P2_4_n", "P2_5_n", "P2_6_n", "P2_7_n", "P2_8_n", "P2_9_n", "P2_10_n", "P2_11_n", "P2_12_n", "P2_13_n", "P5_6_n", "P5_7_n", "P5_8_n", "P5_9_n", "P5_10_n", "P5_11_n", "P5_12_n", "P5_13_n", "P5_14_n", "P5_15_n", "P7_2_n", "P7_3_n", "P7_4_n", "P7_5_n", "P7_6_n", "P7_7_n", "P8_2_n", "P8_3_n", "P8_4_n", "P8_5_n", "P8_6_n", "P8_7_n"], + "P2_p": ["P2_4_p", "P2_5_p", "P2_6_p", "P2_7_p", "P2_8_p", "P2_9_p", "P2_10_p", "P2_11_p", "P2_12_p", "P2_13_p", "P5_6_p", "P5_7_p", "P5_8_p", "P5_9_p", "P5_10_p", "P5_11_p", "P5_12_p", "P5_13_p", "P5_14_p", "P5_15_p", "P7_2_p", "P7_3_p", "P7_4_p", "P7_5_p", "P7_6_p", "P7_7_p", "P8_2_p", "P8_3_p", "P8_4_p", "P8_5_p", "P8_6_p", "P8_7_p"], + "P2_Chl": ["P2_4_Chl", "P2_5_Chl", "P2_6_Chl", "P2_7_Chl", "P2_8_Chl", "P2_9_Chl", "P2_10_Chl", "P2_11_Chl", "P2_12_Chl", "P2_13_Chl", "P5_6_Chl", "P5_7_Chl", "P5_8_Chl", "P5_9_Chl", "P5_10_Chl", "P5_11_Chl", "P5_12_Chl", "P5_13_Chl", "P5_14_Chl", "P5_15_Chl", "P7_2_Chl", "P7_3_Chl", "P7_4_Chl", "P7_5_Chl", "P7_6_Chl", "P7_7_Chl", "P8_2_Chl", "P8_3_Chl", "P8_4_Chl", "P8_5_Chl", "P8_6_Chl", "P8_7_Chl"], + "P3_c": ["P3_0_c", "P3_1_c", "P3_2_c", "P9_m2_c", "P9_m1_c", "P9_0_c", "P6_m4_c", "P6_m3_c"], + "P3_n": ["P3_0_n", "P3_1_n", "P3_2_n", "P9_m2_n", "P9_m1_n", "P9_0_n", "P6_m4_n", "P6_m3_n"], + "P3_p": ["P3_0_p", "P3_1_p", "P3_2_p", "P9_m2_p", "P9_m1_p", "P9_0_p", "P6_m4_p", "P6_m3_p"], + "P3_Chl": ["P3_0_Chl", "P3_1_Chl", "P3_2_Chl", "P9_m2_Chl", "P9_m1_Chl", "P9_0_Chl", "P6_m4_Chl", "P6_m3_Chl"], + "Z6_c": ["Z6_5_c", "Z6_6_c", "Z6_7_c", "Z6_8_c", "Z6_9_c", "Z6_10_c", "Z6_11_c"], + "Z6_n": ["Z6_5_n", "Z6_6_n", "Z6_7_n", "Z6_8_n", "Z6_9_n", "Z6_10_n", "Z6_11_n"], + "Z6_p": ["Z6_5_p", "Z6_6_p", "Z6_7_p", "Z6_8_p", "Z6_9_p", "Z6_10_p", "Z6_11_p"], + "Z5_c": ["Z5_9_c", "Z5_10_c", "Z5_11_c", "Z5_12_c", "Z5_13_c", "Z5_14_c", "Z5_15_c", "Z5_16_c", "Z5_17_c", "Z5_18_c"], + "Z5_n": ["Z5_9_n", "Z5_10_n", "Z5_11_n", "Z5_12_n", "Z5_13_n", "Z5_14_n", "Z5_15_n", "Z5_16_n", "Z5_17_n", "Z5_18_n"], + "Z5_p": ["Z5_9_p", "Z5_10_p", "Z5_11_p", "Z5_12_p", "Z5_13_p", "Z5_14_p", "Z5_15_p", "Z5_16_p", "Z5_17_p", "Z5_18_p"], + "Z4_c": ["Z4_15_c", "Z4_16_c", "Z4_17_c", "Z4_18_c", "Z4_19_c", "Z4_20_c", "Z4_21_c", "Z4_22_c", "Z4_23_c", "Z4_24_c"], + "Z4_n": ["Z4_15_n", "Z4_16_n", "Z4_17_n", "Z4_18_n", "Z4_19_n", "Z4_20_n", "Z4_21_n", "Z4_22_n", "Z4_23_n", "Z4_24_n"], + "Z4_p": ["Z4_15_p", "Z4_16_p", "Z4_17_p", "Z4_18_p", "Z4_19_p", "Z4_20_p", "Z4_21_p", "Z4_22_p", "Z4_23_p", "Z4_24_p"], + "Z3_c": ["Z3_22_c", "Z3_23_c", "Z3_24_c", "Z3_25_c", "Z3_26_c", "Z3_27_c", "Z3_28_c", "Z3_29_c", "Z3_30_c", "Z3_31_c"], + "Z3_n": ["Z3_22_n", "Z3_23_n", "Z3_24_n", "Z3_25_n", "Z3_26_n", "Z3_27_n", "Z3_28_n", "Z3_29_n", "Z3_30_n", "Z3_31_n"], + "Z3_p": ["Z3_22_p", "Z3_23_p", "Z3_24_p", "Z3_25_p", "Z3_26_p", "Z3_27_p", "Z3_28_p", "Z3_29_p", "Z3_30_p", "Z3_31_p"] +} + +def process_nc(input_file_path, chiave): + TRN_chiave = f"TRN{chiave}" + valori = mapping.get(chiave) + n_val = len(valori) + + with nc.Dataset(input_file_path, 'r') as src: + + for valore in valori: + output_filename = f"{file_prefix}{valore}.nc" + output_path = output_dir / output_filename + TRN_valore = f"TRN{valore}" + + with nc.Dataset(output_path, 'w', format=src.file_format) as dst: + dst.setncatts(src.__dict__) + for name, dimension in src.dimensions.items(): + dst.createDimension(name, (len(dimension) if not dimension.isunlimited() else None)) + + for name, variable in src.variables.items(): + if name == TRN_chiave: + var = dst.createVariable(TRN_valore, variable.datatype, variable.dimensions) + dst[TRN_valore].setncatts(variable.__dict__) + + # dividi i valori per il numero di file di uscita + dst[TRN_valore][:] = src[TRN_chiave][:] / n_val + + else: + var = dst.createVariable(name, variable.datatype, variable.dimensions) + dst[name].setncatts(variable.__dict__) + dst[name][:] = src[name][:] + + print(f"Creato {output_filename}") + +def main(): + for input_file_path in input_dir.glob("*.nc"): + state_var = input_file_path.name.replace(file_prefix, "").replace(".nc", "") + if state_var in mapping: + process_nc(input_file_path, state_var) + +if __name__ == "__main__": + main() \ No newline at end of file From 2694e28b685ead83575276ed8725482da84d93d1 Mon Sep 17 00:00:00 2001 From: Paolo Lazzari Date: Fri, 15 May 2026 10:48:59 +0200 Subject: [PATCH 92/97] utility to create boundary conditions namelists with ogstm-fabm --- testcase/create_ogstm_atl_nml.py | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 testcase/create_ogstm_atl_nml.py diff --git a/testcase/create_ogstm_atl_nml.py b/testcase/create_ogstm_atl_nml.py new file mode 100644 index 00000000..341141cc --- /dev/null +++ b/testcase/create_ogstm_atl_nml.py @@ -0,0 +1,30 @@ +import os +import pyfabm + +CODEPATH = '../../' +CODEPATH = CODEPATH.replace("~", os.getenv("HOME")) +fabm_yaml = "/leonardo_work/OGS_test2528_0/plazzari/OGSTM-FABM/ModelBuild/ogstm/testcase/TEST02/wrkdir/MODEL/fabm.yaml" + + +def generate_atl_nml(fabm_yaml_path, output_file="atl.nml"): + model = pyfabm.Model(fabm_yaml_path) + + state_vars = [v.name.replace('/', '_') for v in model.state_variables] + n_vars = len(state_vars) + + with open(output_file, 'w') as f: + f.write("&VARS_DIMENSION\n") + f.write(f" n_vars = {n_vars}\n") + f.write("/\n") + f.write("\n") + f.write("&CORE\n") + f.write("\n") + for i, name in enumerate(state_vars, start=1): + f.write(f' vars({i}) = "{name}"\n') + f.write("/\n") + + print(f"Generated {output_file} with {n_vars} state variables.") + + +if __name__ == "__main__": + generate_atl_nml(fabm_yaml) From c212dbbc797a337a549a22bd6b08d027e32c2f91 Mon Sep 17 00:00:00 2001 From: Paolo Lazzari Date: Fri, 15 May 2026 10:52:34 +0200 Subject: [PATCH 93/97] refine utility to create boundary conditions namelists with ogstm-fabm --- testcase/create_ogstm_atl_nml.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/testcase/create_ogstm_atl_nml.py b/testcase/create_ogstm_atl_nml.py index 341141cc..1f68e213 100644 --- a/testcase/create_ogstm_atl_nml.py +++ b/testcase/create_ogstm_atl_nml.py @@ -1,8 +1,6 @@ import os import pyfabm -CODEPATH = '../../' -CODEPATH = CODEPATH.replace("~", os.getenv("HOME")) fabm_yaml = "/leonardo_work/OGS_test2528_0/plazzari/OGSTM-FABM/ModelBuild/ogstm/testcase/TEST02/wrkdir/MODEL/fabm.yaml" @@ -18,11 +16,14 @@ def generate_atl_nml(fabm_yaml_path, output_file="atl.nml"): f.write("/\n") f.write("\n") f.write("&CORE\n") + f.write("\n") for i, name in enumerate(state_vars, start=1): f.write(f' vars({i}) = "{name}"\n') + f.write("\n") + f.write(" geometry = 3\n") + f.write(" damping_coeff = 3000.0d0\n") f.write("/\n") - print(f"Generated {output_file} with {n_vars} state variables.") From 247840239e7d3bd93214eb4696fc66c1d6fae533 Mon Sep 17 00:00:00 2001 From: Marco-Puglia Date: Fri, 15 May 2026 12:11:09 +0200 Subject: [PATCH 94/97] new create_ATL98.py file --- testcase/create_ATL98.py | 107 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 107 insertions(+) create mode 100644 testcase/create_ATL98.py diff --git a/testcase/create_ATL98.py b/testcase/create_ATL98.py new file mode 100644 index 00000000..03c1568b --- /dev/null +++ b/testcase/create_ATL98.py @@ -0,0 +1,107 @@ +#!/usr/bin/env python3 +import netCDF4 as nc +import numpy as np +from pathlib import Path + +# Cartella di input/output +input_file = "/leonardo_work/OGS_test2528_0/plazzari/OGSTM-FABM/OGSTM-BFM-qDeg/MED_BIODIV_T0/wrkdir/MODEL/BC/ATL_yyyy0630-00:00:00.nc" +output_file = "/leonardo_work/OGS_test2528_0/plazzari/OGSTM-FABM/OGSTM-BFM-qDeg/MED_BIODIV_T0/wrkdir/MODEL/BC/ATL98_yyyy0630-00:00:00.nc" + +# Dizionario di mapping: +# chiave = nome file originale +# valore = lista dei nuovi file da creare +mapping = { + "N1_p": ["N1_p"], + "N3_n": ["N3_n"], + "N4_n": ["N4_n"], + "N5_s": ["N5_s"], + "N6_r": ["N6_r"], + "O2_o": ["O2_o"], + "O3_c": ["O3_c"], + "O3h_h": ["O3h_h"], + "O4_n": ["O4_n"], + "O5_c": ["O5_c"], + "R1_c": ["R1_c"], + "R1_n": ["R1_n"], + "R1_p": ["R1_p"], + "R1_s": ["R1_s"], + "R2_c": ["R2_c"], + "R3_c": ["R3_c"], + "R6_c": ["R6_c"], + "R6_n": ["R6_n"], + "R6_p": ["R6_p"], + "R6_s": ["R6_s"], + "R8_c": ["R8_c"], + "R8_n": ["R8_n"], + "R8_p": ["R8_p"], + "R8_s": ["R8_s"], + "X1_c": ["X1_c"], + "X2_c": ["X2_c"], + "X3_c": ["X3_c"], + "B1_c": ["B1_m5_c"], + "B1_n": ["B1_m5_n"], + "B1_p": ["B1_m5_p"], + "P1_c": ["P1_11_c", "P1_12_c", "P1_13_c", "P1_14_c", "P1_15_c", "P1_16_c", "P1_17_c", "P1_18_c", "P1_19_c", "P1_20_c"], + "P1_n": ["P1_11_n", "P1_12_n", "P1_13_n", "P1_14_n", "P1_15_n", "P1_16_n", "P1_17_n", "P1_18_n", "P1_19_n", "P1_20_n"], + "P1_p": ["P1_11_p", "P1_12_p", "P1_13_p", "P1_14_p", "P1_15_p", "P1_16_p", "P1_17_p", "P1_18_p", "P1_19_p", "P1_20_p"], + "P1_Chl": ["P1_11_Chl", "P1_12_Chl", "P1_13_Chl", "P1_14_Chl", "P1_15_Chl", "P1_16_Chl", "P1_17_Chl", "P1_18_Chl", "P1_19_Chl", "P1_20_Chl"], + "P1_s": ["P1_11_s", "P1_12_s", "P1_13_s", "P1_14_s", "P1_15_s", "P1_16_s", "P1_17_s", "P1_18_s", "P1_19_s", "P1_20_s"], + "P4_c": ["P4_11_c", "P4_12_c", "P4_13_c", "P4_14_c", "P4_15_c", "P4_16_c", "P4_17_c", "P4_18_c", "P4_19_c", "P4_20_c"], + "P4_n": ["P4_11_n", "P4_12_n", "P4_13_n", "P4_14_n", "P4_15_n", "P4_16_n", "P4_17_n", "P4_18_n", "P4_19_n", "P4_20_n"], + "P4_p": ["P4_11_p", "P4_12_p", "P4_13_p", "P4_14_p", "P4_15_p", "P4_16_p", "P4_17_p", "P4_18_p", "P4_19_p", "P4_20_p"], + "P4_Chl": ["P4_11_Chl", "P4_12_Chl", "P4_13_Chl", "P4_14_Chl", "P4_15_Chl", "P4_16_Chl", "P4_17_Chl", "P4_18_Chl", "P4_19_Chl", "P4_20_Chl"], + "P2_c": ["P2_4_c", "P2_5_c", "P2_6_c", "P2_7_c", "P2_8_c", "P2_9_c", "P2_10_c", "P2_11_c", "P2_12_c", "P2_13_c", "P5_6_c", "P5_7_c", "P5_8_c", "P5_9_c", "P5_10_c", "P5_11_c", "P5_12_c", "P5_13_c", "P5_14_c", "P5_15_c", "P7_2_c", "P7_3_c", "P7_4_c", "P7_5_c", "P7_6_c", "P7_7_c", "P8_2_c", "P8_3_c", "P8_4_c", "P8_5_c", "P8_6_c", "P8_7_c"], + "P2_n": ["P2_4_n", "P2_5_n", "P2_6_n", "P2_7_n", "P2_8_n", "P2_9_n", "P2_10_n", "P2_11_n", "P2_12_n", "P2_13_n", "P5_6_n", "P5_7_n", "P5_8_n", "P5_9_n", "P5_10_n", "P5_11_n", "P5_12_n", "P5_13_n", "P5_14_n", "P5_15_n", "P7_2_n", "P7_3_n", "P7_4_n", "P7_5_n", "P7_6_n", "P7_7_n", "P8_2_n", "P8_3_n", "P8_4_n", "P8_5_n", "P8_6_n", "P8_7_n"], + "P2_p": ["P2_4_p", "P2_5_p", "P2_6_p", "P2_7_p", "P2_8_p", "P2_9_p", "P2_10_p", "P2_11_p", "P2_12_p", "P2_13_p", "P5_6_p", "P5_7_p", "P5_8_p", "P5_9_p", "P5_10_p", "P5_11_p", "P5_12_p", "P5_13_p", "P5_14_p", "P5_15_p", "P7_2_p", "P7_3_p", "P7_4_p", "P7_5_p", "P7_6_p", "P7_7_p", "P8_2_p", "P8_3_p", "P8_4_p", "P8_5_p", "P8_6_p", "P8_7_p"], + "P2_Chl": ["P2_4_Chl", "P2_5_Chl", "P2_6_Chl", "P2_7_Chl", "P2_8_Chl", "P2_9_Chl", "P2_10_Chl", "P2_11_Chl", "P2_12_Chl", "P2_13_Chl", "P5_6_Chl", "P5_7_Chl", "P5_8_Chl", "P5_9_Chl", "P5_10_Chl", "P5_11_Chl", "P5_12_Chl", "P5_13_Chl", "P5_14_Chl", "P5_15_Chl", "P7_2_Chl", "P7_3_Chl", "P7_4_Chl", "P7_5_Chl", "P7_6_Chl", "P7_7_Chl", "P8_2_Chl", "P8_3_Chl", "P8_4_Chl", "P8_5_Chl", "P8_6_Chl", "P8_7_Chl"], + "P3_c": ["P3_0_c", "P3_1_c", "P3_2_c", "P9_m2_c", "P9_m1_c", "P9_0_c", "P6_m4_c", "P6_m3_c"], + "P3_n": ["P3_0_n", "P3_1_n", "P3_2_n", "P9_m2_n", "P9_m1_n", "P9_0_n", "P6_m4_n", "P6_m3_n"], + "P3_p": ["P3_0_p", "P3_1_p", "P3_2_p", "P9_m2_p", "P9_m1_p", "P9_0_p", "P6_m4_p", "P6_m3_p"], + "P3_Chl": ["P3_0_Chl", "P3_1_Chl", "P3_2_Chl", "P9_m2_Chl", "P9_m1_Chl", "P9_0_Chl", "P6_m4_Chl", "P6_m3_Chl"], + "Z6_c": ["Z6_5_c", "Z6_6_c", "Z6_7_c", "Z6_8_c", "Z6_9_c", "Z6_10_c", "Z6_11_c"], + "Z6_n": ["Z6_5_n", "Z6_6_n", "Z6_7_n", "Z6_8_n", "Z6_9_n", "Z6_10_n", "Z6_11_n"], + "Z6_p": ["Z6_5_p", "Z6_6_p", "Z6_7_p", "Z6_8_p", "Z6_9_p", "Z6_10_p", "Z6_11_p"], + "Z5_c": ["Z5_9_c", "Z5_10_c", "Z5_11_c", "Z5_12_c", "Z5_13_c", "Z5_14_c", "Z5_15_c", "Z5_16_c", "Z5_17_c", "Z5_18_c"], + "Z5_n": ["Z5_9_n", "Z5_10_n", "Z5_11_n", "Z5_12_n", "Z5_13_n", "Z5_14_n", "Z5_15_n", "Z5_16_n", "Z5_17_n", "Z5_18_n"], + "Z5_p": ["Z5_9_p", "Z5_10_p", "Z5_11_p", "Z5_12_p", "Z5_13_p", "Z5_14_p", "Z5_15_p", "Z5_16_p", "Z5_17_p", "Z5_18_p"], + "Z4_c": ["Z4_15_c", "Z4_16_c", "Z4_17_c", "Z4_18_c", "Z4_19_c", "Z4_20_c", "Z4_21_c", "Z4_22_c", "Z4_23_c", "Z4_24_c"], + "Z4_n": ["Z4_15_n", "Z4_16_n", "Z4_17_n", "Z4_18_n", "Z4_19_n", "Z4_20_n", "Z4_21_n", "Z4_22_n", "Z4_23_n", "Z4_24_n"], + "Z4_p": ["Z4_15_p", "Z4_16_p", "Z4_17_p", "Z4_18_p", "Z4_19_p", "Z4_20_p", "Z4_21_p", "Z4_22_p", "Z4_23_p", "Z4_24_p"], + "Z3_c": ["Z3_22_c", "Z3_23_c", "Z3_24_c", "Z3_25_c", "Z3_26_c", "Z3_27_c", "Z3_28_c", "Z3_29_c", "Z3_30_c", "Z3_31_c"], + "Z3_n": ["Z3_22_n", "Z3_23_n", "Z3_24_n", "Z3_25_n", "Z3_26_n", "Z3_27_n", "Z3_28_n", "Z3_29_n", "Z3_30_n", "Z3_31_n"], + "Z3_p": ["Z3_22_p", "Z3_23_p", "Z3_24_p", "Z3_25_p", "Z3_26_p", "Z3_27_p", "Z3_28_p", "Z3_29_p", "Z3_30_p", "Z3_31_p"] +} + +def main(): + with nc.Dataset(input_file, 'r') as src: + with nc.Dataset(output_file, 'w', format=src.file_format) as dst: + dst.setncatts(src.__dict__) + for name, dimension in src.dimensions.items(): + dst.createDimension(name, (len(dimension) if not dimension.isunlimited() else None)) + + for name, variable in src.variables.items(): + if name in mapping: + target_names = mapping[name] + n_val = len(target_names) + + print(f"Dividendo {name}") + + for t_name in target_names: + + new_var = dst.createVariable(t_name, variable.datatype, variable.dimensions) + new_var.setncatts(variable.__dict__) + + # dividi i valori per il numero di file di uscita + new_var[:] = src[name][:] / n_val + + else: + if name not in dst.variables: + new_var = dst.createVariable(name, variable.datatype, variable.dimensions) + new_var.setncatts(variable.__dict__) + new_var[:] = src[name][:] + + print(f"Creato {output_file}") + +if __name__ == "__main__": + main() + From 985582b19e4452ade07f62d2ed15eb5056ffb21d Mon Sep 17 00:00:00 2001 From: Marco-Puglia <60135413+Marco-Puglia@users.noreply.github.com> Date: Mon, 18 May 2026 10:37:33 +0200 Subject: [PATCH 95/97] Update create_ATL98.py --- testcase/create_ATL98.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/testcase/create_ATL98.py b/testcase/create_ATL98.py index 03c1568b..a3ee47b9 100644 --- a/testcase/create_ATL98.py +++ b/testcase/create_ATL98.py @@ -91,7 +91,7 @@ def main(): new_var = dst.createVariable(t_name, variable.datatype, variable.dimensions) new_var.setncatts(variable.__dict__) - # dividi i valori per il numero di file di uscita + # dividi i nomi per il numero di valori new_var[:] = src[name][:] / n_val else: From d81ec1fa684af0b53b035e2ad53802b27ded07eb Mon Sep 17 00:00:00 2001 From: Paolo Lazzari Date: Mon, 18 May 2026 13:45:48 +0200 Subject: [PATCH 96/97] Bug Fix for Parallel I/O when CPU per node > 99, more than two digit required. --- src/MPI/mpi_gather_info.f90 | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/MPI/mpi_gather_info.f90 b/src/MPI/mpi_gather_info.f90 index de1d2df7..f7e7f000 100644 --- a/src/MPI/mpi_gather_info.f90 +++ b/src/MPI/mpi_gather_info.f90 @@ -70,9 +70,8 @@ MODULE MPI_GATHER_INFO double precision, allocatable :: tottrnIO(:,:,:) - CHARACTER(len=2) :: n_ranks_per_node_char + CHARACTER(len=4) :: n_ranks_per_node_char INTEGER :: n_ranks_per_node - !WRITING_RANK = .FALSE. CONTAINS From d5f29ff23badadbbecac4e2a78ad0fe35e1502d8 Mon Sep 17 00:00:00 2001 From: Paolo Lazzari Date: Tue, 26 May 2026 11:07:05 +0200 Subject: [PATCH 97/97] Script to create 1.aveTimes type files --- testcase/date_generator.py | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 testcase/date_generator.py diff --git a/testcase/date_generator.py b/testcase/date_generator.py new file mode 100644 index 00000000..6eeedb69 --- /dev/null +++ b/testcase/date_generator.py @@ -0,0 +1,38 @@ +from datetime import datetime, timedelta + +def create_ave_times(start_str, end_str, step_value, step_unit, output_file="2.aveTimes"): + fmt = "%Y%m%d-%H:%M:%S" + start = datetime.strptime(start_str, fmt) + end = datetime.strptime(end_str, fmt) + + if step_value <= 0: + raise ValueError("step_value deve essere positivo") + + step_unit = step_unit.lower() + + if step_unit in ["second", "seconds", "sec", "s"]: + delta = timedelta(seconds=step_value) + elif step_unit in ["minute", "minutes", "min", "m"]: + delta = timedelta(minutes=step_value) + elif step_unit in ["hour", "hours", "h"]: + delta = timedelta(hours=step_value) + elif step_unit in ["day", "days", "d"]: + delta = timedelta(days=step_value) + else: + raise ValueError("step_unit deve essere uno tra: seconds, minutes, hours, days") + + current = start + + with open(output_file, "w") as f: + while current <= end: + f.write(current.strftime("%Y%m%d-%H:%M:%S") + "\n") + current += delta + +if __name__ == "__main__": + start_date = "20000101-00:00:00" + end_date = "20010101-00:00:00" + step_value = 1 + step_unit = "days" + + create_ave_times(start_date, end_date, step_value, step_unit) + print("File 2.aveTimes creato con successo.")