Skip to content

Commit

Permalink
Merge pull request #193 from gmao-cda/config/cda/refine_sst_qc
Browse files Browse the repository at this point in the history
stable version for long-period run
  • Loading branch information
cd10kfsu authored Feb 5, 2024
2 parents 45652e8 + 90ef336 commit 24d4b10
Show file tree
Hide file tree
Showing 27 changed files with 282 additions and 108 deletions.
1 change: 1 addition & 0 deletions .github/workflows/get_data.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ jobs:
- name: "check: get_l4_sss_esacci.py"
if: false
run: |
cd ${{github.workspace}}/utils/obs_proc/level-4
pwd
Expand Down
6 changes: 3 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,9 @@ if (SOLO_BUILD) # build ocean-letkf with local libs. Most users should use this
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -fallow-argument-mismatch -fallow-invalid-boz")
endif ()
elseif (CMAKE_Fortran_COMPILER_ID MATCHES "Intel")
set(CMAKE_Fortran_FLAGS "-O2 -g -traceback")
set(CMAKE_Fortran_FLAGS_DEBUG "-O0 -traceback -check bounds")
set(CMAKE_Fortran_FLAGS_RELEASE "-O3")
set(CMAKE_Fortran_FLAGS "-O2 -g -traceback -init=zero")
set(CMAKE_Fortran_FLAGS_DEBUG "-O0 -traceback -check bounds -init=zero")
set(CMAKE_Fortran_FLAGS_RELEASE "-O3 -init=zero")
endif()

else() # build as an application with GEOS-ESM infra
Expand Down
4 changes: 2 additions & 2 deletions build/make_letkf.cice5.sh
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ else
LBLAS=""
fi

#F90_FPP='-fpp' # Fortran preprocessor
F90_FPP="$F90_FPP" # Fortran preprocessor

$F90 $OMP $F90_OPT $F90_DEBUG $F90_INLINE $F90_OBJECT_FLAG SFMT.f90
$F90 $OMP $F90_OPT $F90_DEBUG $F90_INLINE $F90_OBJECT_FLAG common.f90
Expand All @@ -66,7 +66,7 @@ $F90 $OMP $F90_OPT $F90_DEBUG $F90_OBJECT_FLAG $NETCDF_INC common_mpi_$model.f90
$F90 $OMP $F90_OPT $F90_DEBUG $F90_OBJECT_FLAG letkf_obs.f90
$F90 $OMP $F90_OPT $F90_DEBUG $F90_OBJECT_FLAG vars_letkf.f90
$F90 $OMP $F90_OPT $F90_DEBUG $F90_OBJECT_FLAG letkf_local.f90
$F90 $OMP $F90_OPT $F90_DEBUG $F90_OBJECT_FLAG letkf_local.o letkf_tools.f90
$F90 $OMP $F90_OPT $F90_DEBUG $F90_FPP $F90_OBJECT_FLAG letkf_local.o letkf_tools.f90
$F90 $OMP $F90_OPT $F90_DEBUG $F90_FPP $F90_OBJECT_FLAG input_nml_${model}.f90
$F90 $OMP $F90_OPT $F90_DEBUG $F90_FPP $F90_OBJECT_FLAG letkf.f90
$F90 $OMP $F90_OPT $F90_DEBUG $F90_INLINE -o ${PGM} *.o $MPI_LIB $NETCDF_LIB $LBLAS
Expand Down
2 changes: 1 addition & 1 deletion build/make_letkf.hycom.sh
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ $F90 $OMP $F90_OPT $F90_DEBUG $F90_OBJECT_FLAG $NETCDF_INC common_mpi_$model.f90
$F90 $OMP $F90_OPT $F90_DEBUG $F90_OBJECT_FLAG letkf_obs.f90
$F90 $OMP $F90_OPT $F90_DEBUG $F90_OBJECT_FLAG vars_letkf.f90
$F90 $OMP $F90_OPT $F90_DEBUG $F90_OBJECT_FLAG letkf_local.f90
$F90 $OMP $F90_OPT $F90_DEBUG $F90_OBJECT_FLAG letkf_local.o letkf_tools.f90
$F90 $OMP $F90_OPT $F90_DEBUG $F90_FPP $F90_OBJECT_FLAG letkf_local.o letkf_tools.f90
$F90 $OMP $F90_OPT $F90_DEBUG $F90_FPP $F90_OBJECT_FLAG input_nml_${model}.f90
$F90 $OMP $F90_OPT $F90_DEBUG $F90_FPP $F90_OBJECT_FLAG letkf.f90
$F90 $OMP $F90_OPT $F90_DEBUG $F90_INLINE -o ${PGM} *.o $MPI_LIB $NETCDF_LIB $LBLAS
Expand Down
4 changes: 3 additions & 1 deletion build/make_letkf.hycom_nrl.sh
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ else
LBLAS=""
fi

F90_FPP="$F90_FPP" # Fortran preprocessor

#$F90 $OMP $F90_OPT_HYCOM_IO $F90_DEBUG $F90_INLINE $F90_OBJECT_FLAG mod_xc.F
#$F90 $OMP $F90_OPT_HYCOM_IO $F90_DEBUG $F90_INLINE $F90_OBJECT_FLAG mod_xc.o mod_za.F
#$F90 $OMP $F90_OPT_HYCOM_IO $F90_DEBUG $F90_INLINE $F90_OBJECT_FLAG wtime.F
Expand Down Expand Up @@ -74,7 +76,7 @@ $F90 $OMP $F90_OPT $F90_DEBUG $F90_OBJECT_FLAG $NETCDF_INC common_mpi_$model.f90
$F90 $OMP $F90_OPT $F90_DEBUG $F90_OBJECT_FLAG letkf_obs.f90
$F90 $OMP $F90_OPT $F90_DEBUG $F90_OBJECT_FLAG vars_letkf.f90
$F90 $OMP $F90_OPT $F90_DEBUG $F90_OBJECT_FLAG letkf_local.f90
$F90 $OMP $F90_OPT $F90_DEBUG $F90_OBJECT_FLAG letkf_local.o letkf_tools.f90
$F90 $OMP $F90_OPT $F90_DEBUG $F90_FPP $F90_OBJECT_FLAG letkf_local.o letkf_tools.f90
$F90 $OMP $F90_OPT $F90_DEBUG $F90_FPP $F90_OBJECT_FLAG letkf.f90
$F90 $OMP $F90_OPT $F90_DEBUG $F90_INLINE -o ${PGM} *.o $MPI_LIB $NETCDF_LIB $LBLAS

Expand Down
2 changes: 1 addition & 1 deletion build/make_letkf.mom4.sh
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ $F90 $OMP $F90_OPT $F90_DEBUG $F90_OBJECT_FLAG $NETCDF_INC common_mpi_$model.f90
$F90 $OMP $F90_OPT $F90_DEBUG $F90_OBJECT_FLAG letkf_obs.f90
$F90 $OMP $F90_OPT $F90_DEBUG $F90_OBJECT_FLAG vars_letkf.f90
$F90 $OMP $F90_OPT $F90_DEBUG $F90_OBJECT_FLAG letkf_local.f90
$F90 $OMP $F90_OPT $F90_DEBUG $F90_OBJECT_FLAG letkf_local.o letkf_tools.f90
$F90 $OMP $F90_OPT $F90_DEBUG $F90_FPP $F90_OBJECT_FLAG letkf_local.o letkf_tools.f90
$F90 $OMP $F90_OPT $F90_DEBUG $F90_FPP $F90_OBJECT_FLAG input_nml_${model}.f90
$F90 $OMP $F90_OPT $F90_DEBUG $F90_FPP $F90_OBJECT_FLAG letkf.f90
$F90 $OMP $F90_OPT $F90_DEBUG $F90_INLINE -o ${PGM} *.o $MPI_LIB $NETCDF_LIB $LBLAS
Expand Down
38 changes: 19 additions & 19 deletions build/make_letkf.mom6.sh
Original file line number Diff line number Diff line change
Expand Up @@ -48,31 +48,31 @@ else
LBLAS=""
fi

#F90_FPP='-fpp' # Fortran preprocessor
F90_FPP="${F90_FPP} -DMOM6" # Fortran preprocessor

$F90 $OMP $F90_OPT $F90_DEBUG $F90_INLINE $F90_OBJECT_FLAG SFMT.f90
$F90 $OMP $F90_OPT $F90_DEBUG $F90_INLINE $F90_OBJECT_FLAG common.f90
$F90 $OMP $F90_OPT $F90_DEBUG $F90_OBJECT_FLAG common_mpi.f90
$F90 $OMP $F90_OPT $F90_DEBUG $F90_INLINE $F90_OBJECT_FLAG common_mtx.f90
$F90 $OMP $F90_OPT $F90_DEBUG $F90_INLINE $F90_OBJECT_FLAG netlib2.f
$F90 $OMP $F90_OPT $F90_DEBUG $F90_INLINE $F90_OBJECT_FLAG params_letkf.f90
$F90 $OMP $F90_OPT $F90_DEBUG $F90_OBJECT_FLAG common_letkf.f90
$F90 $OMP $F90_OPT $F90_DEBUG $F90_FPP $F90_INLINE $F90_OBJECT_FLAG SFMT.f90
$F90 $OMP $F90_OPT $F90_DEBUG $F90_FPP $F90_INLINE $F90_OBJECT_FLAG common.f90
$F90 $OMP $F90_OPT $F90_DEBUG $F90_FPP $F90_OBJECT_FLAG common_mpi.f90
$F90 $OMP $F90_OPT $F90_DEBUG $F90_FPP $F90_INLINE $F90_OBJECT_FLAG common_mtx.f90
$F90 $OMP $F90_OPT $F90_DEBUG $F90_FPP $F90_INLINE $F90_OBJECT_FLAG netlib2.f
$F90 $OMP $F90_OPT $F90_DEBUG $F90_FPP $F90_INLINE $F90_OBJECT_FLAG params_letkf.f90
$F90 $OMP $F90_OPT $F90_DEBUG $F90_FPP $F90_OBJECT_FLAG common_letkf.f90
$F90 $OMP $F90_OPT $F90_DEBUG $F90_FPP $F90_OBJECT_FLAG params_model.f90
$F90 $OMP $F90_OPT $F90_DEBUG $F90_FPP $F90_OBJECT_FLAG vars_model.f90
$F90 $OMP $F90_OPT $F90_DEBUG $F90_OBJECT_FLAG common_debug_$model.f90
$F90 $OMP $F90_OPT $F90_DEBUG $F90_FPP $F90_OBJECT_FLAG common_debug_$model.f90
$F90 $OMP $F90_OPT $F90_DEBUG $F90_FPP $F90_INLINE $NETCDF_INC $F90_OBJECT_FLAG common_$model.f90
$F90 $OMP $F90_OPT $F90_DEBUG $F90_OBJECT_FLAG params_obs.f90
$F90 $OMP $F90_OPT $F90_DEBUG $F90_OBJECT_FLAG vars_obs.f90
$F90 $OMP $F90_OPT $F90_DEBUG $F90_OBJECT_FLAG $NETCDF_INC common_mpi_$model.f90
$F90 $OMP $F90_OPT $F90_DEBUG $F90_OBJECT_FLAG kdtree.f90
$F90 $OMP $F90_OPT $F90_DEBUG $F90_OBJECT_FLAG common_obs_$model.f90
$F90 $OMP $F90_OPT $F90_DEBUG $F90_OBJECT_FLAG letkf_obs.f90
$F90 $OMP $F90_OPT $F90_DEBUG $F90_OBJECT_FLAG vars_letkf.f90
$F90 $OMP $F90_OPT $F90_DEBUG $F90_OBJECT_FLAG letkf_local.f90
$F90 $OMP $F90_OPT $F90_DEBUG $F90_OBJECT_FLAG letkf_local.o letkf_tools.f90
$F90 $OMP $F90_OPT $F90_DEBUG $F90_FPP $F90_OBJECT_FLAG params_obs.f90
$F90 $OMP $F90_OPT $F90_DEBUG $F90_FPP $F90_OBJECT_FLAG vars_obs.f90
$F90 $OMP $F90_OPT $F90_DEBUG $F90_FPP $F90_OBJECT_FLAG $NETCDF_INC common_mpi_$model.f90
$F90 $OMP $F90_OPT $F90_DEBUG $F90_FPP $F90_OBJECT_FLAG kdtree.f90
$F90 $OMP $F90_OPT $F90_DEBUG $F90_FPP $F90_OBJECT_FLAG common_obs_$model.f90
$F90 $OMP $F90_OPT $F90_DEBUG $F90_FPP $F90_OBJECT_FLAG letkf_obs.f90
$F90 $OMP $F90_OPT $F90_DEBUG $F90_FPP $F90_OBJECT_FLAG vars_letkf.f90
$F90 $OMP $F90_OPT $F90_DEBUG $F90_FPP $F90_OBJECT_FLAG letkf_local.f90
$F90 $OMP $F90_OPT $F90_DEBUG $F90_FPP $F90_OBJECT_FLAG letkf_local.o letkf_tools.f90
$F90 $OMP $F90_OPT $F90_DEBUG $F90_FPP $F90_OBJECT_FLAG input_nml_${model}.f90
$F90 $OMP $F90_OPT $F90_DEBUG $F90_FPP $F90_OBJECT_FLAG letkf.f90
$F90 $OMP $F90_OPT $F90_DEBUG $F90_INLINE -o ${PGM} *.o $MPI_LIB $NETCDF_LIB $LBLAS
$F90 $OMP $F90_OPT $F90_DEBUG $F90_FPP $F90_INLINE -o ${PGM} *.o $MPI_LIB $NETCDF_LIB $LBLAS

#STEVE: keep a record of the build by keeping the *.f90 files
rm -f *.mod
Expand Down
40 changes: 20 additions & 20 deletions build/make_letkf.mom6_dynamic.sh
Original file line number Diff line number Diff line change
Expand Up @@ -46,31 +46,31 @@ else
LBLAS=""
fi

F90_FPP="$F90_FPP -DDYNAMIC" # Fortran preprocessor
F90_FPP="$F90_FPP -DDYNAMIC -DMOM6" # Fortran preprocessor

$F90 $OMP $F90_OPT $F90_DEBUG $F90_INLINE $F90_OBJECT_FLAG SFMT.f90
$F90 $OMP $F90_OPT $F90_DEBUG $F90_INLINE $F90_OBJECT_FLAG common.f90
$F90 $OMP $F90_OPT $F90_DEBUG $F90_OBJECT_FLAG common_mpi.f90
$F90 $OMP $F90_OPT $F90_DEBUG $F90_INLINE $F90_OBJECT_FLAG common_mtx.f90
$F90 $OMP $F90_OPT $F90_DEBUG $F90_INLINE $F90_OBJECT_FLAG netlib2.f
$F90 $OMP $F90_OPT $F90_DEBUG $F90_INLINE $F90_OBJECT_FLAG params_letkf.f90
$F90 $OMP $F90_OPT $F90_DEBUG $F90_OBJECT_FLAG common_letkf.f90
$F90 $OMP $F90_OPT $F90_DEBUG $F90_FPP $F90_OBJECT_FLAG params_model.f90
$F90 $OMP $F90_OPT $F90_DEBUG $F90_FPP $F90_INLINE $F90_OBJECT_FLAG SFMT.f90
$F90 $OMP $F90_OPT $F90_DEBUG $F90_FPP $F90_INLINE $F90_OBJECT_FLAG common.f90
$F90 $OMP $F90_OPT $F90_DEBUG $F90_FPP $F90_OBJECT_FLAG common_mpi.f90
$F90 $OMP $F90_OPT $F90_DEBUG $F90_FPP $F90_INLINE $F90_OBJECT_FLAG common_mtx.f90
$F90 $OMP $F90_OPT $F90_DEBUG $F90_FPP $F90_INLINE $F90_OBJECT_FLAG netlib2.f
$F90 $OMP $F90_OPT $F90_DEBUG $F90_FPP $F90_INLINE $F90_OBJECT_FLAG params_letkf.f90
$F90 $OMP $F90_OPT $F90_DEBUG $F90_FPP $F90_OBJECT_FLAG common_letkf.f90
$F90 $OMP $F90_OPT $F90_DEBUG $F90_FPP $F90_FPP $F90_OBJECT_FLAG params_model.f90
$F90 $OMP $F90_OPT $F90_DEBUG $F90_FPP $F90_OBJECT_FLAG vars_model.f90
$F90 $OMP $F90_OPT $F90_DEBUG $F90_OBJECT_FLAG common_debug_$model.f90
$F90 $OMP $F90_OPT $F90_DEBUG $F90_FPP $F90_OBJECT_FLAG common_debug_$model.f90
$F90 $OMP $F90_OPT $F90_DEBUG $F90_FPP $F90_INLINE $NETCDF_INC $F90_OBJECT_FLAG common_$model.f90
$F90 $OMP $F90_OPT $F90_DEBUG $F90_OBJECT_FLAG params_obs.f90
$F90 $OMP $F90_OPT $F90_DEBUG $F90_OBJECT_FLAG vars_obs.f90
$F90 $OMP $F90_OPT $F90_DEBUG $F90_OBJECT_FLAG $NETCDF_INC common_mpi_$model.f90
$F90 $OMP $F90_OPT $F90_DEBUG $F90_OBJECT_FLAG kdtree.f90
$F90 $OMP $F90_OPT $F90_DEBUG $F90_OBJECT_FLAG common_obs_$model.f90
$F90 $OMP $F90_OPT $F90_DEBUG $F90_OBJECT_FLAG letkf_obs.f90
$F90 $OMP $F90_OPT $F90_DEBUG $F90_OBJECT_FLAG vars_letkf.f90
$F90 $OMP $F90_OPT $F90_DEBUG $F90_OBJECT_FLAG letkf_local.f90
$F90 $OMP $F90_OPT $F90_DEBUG $F90_OBJECT_FLAG letkf_local.o letkf_tools.f90
$F90 $OMP $F90_OPT $F90_DEBUG $F90_FPP $F90_OBJECT_FLAG params_obs.f90
$F90 $OMP $F90_OPT $F90_DEBUG $F90_FPP $F90_OBJECT_FLAG vars_obs.f90
$F90 $OMP $F90_OPT $F90_DEBUG $F90_FPP $F90_OBJECT_FLAG $NETCDF_INC common_mpi_$model.f90
$F90 $OMP $F90_OPT $F90_DEBUG $F90_FPP $F90_OBJECT_FLAG kdtree.f90
$F90 $OMP $F90_OPT $F90_DEBUG $F90_FPP $F90_OBJECT_FLAG common_obs_$model.f90
$F90 $OMP $F90_OPT $F90_DEBUG $F90_FPP $F90_OBJECT_FLAG letkf_obs.f90
$F90 $OMP $F90_OPT $F90_DEBUG $F90_FPP $F90_OBJECT_FLAG vars_letkf.f90
$F90 $OMP $F90_OPT $F90_DEBUG $F90_FPP $F90_OBJECT_FLAG letkf_local.f90
$F90 $OMP $F90_OPT $F90_DEBUG $F90_FPP $F90_OBJECT_FLAG letkf_local.o letkf_tools.f90
$F90 $OMP $F90_OPT $F90_DEBUG $F90_FPP $F90_OBJECT_FLAG input_nml_${model}.f90
$F90 $OMP $F90_OPT $F90_DEBUG $F90_FPP $F90_OBJECT_FLAG letkf.f90
$F90 $OMP $F90_OPT $F90_DEBUG $F90_INLINE -o ${PGM} *.o $MPI_LIB $NETCDF_LIB $LBLAS
$F90 $OMP $F90_OPT $F90_DEBUG $F90_FPP $F90_INLINE -o ${PGM} *.o $MPI_LIB $NETCDF_LIB $LBLAS

#STEVE: keep a record of the build by keeping the *.f90 files
rm -f *.mod
Expand Down
4 changes: 2 additions & 2 deletions build/make_letkf.nemo.sh
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ else
LBLAS=""
fi

#F90_FPP='-fpp' # Fortran preprocessor
F90_FPP="$F90_FPP" # Fortran preprocessor

$F90 $OMP $F90_OPT $F90_DEBUG $F90_INLINE $F90_OBJECT_FLAG SFMT.f90
$F90 $OMP $F90_OPT $F90_DEBUG $F90_INLINE $F90_OBJECT_FLAG common.f90
Expand All @@ -68,7 +68,7 @@ $F90 $OMP $F90_OPT $F90_DEBUG $F90_OBJECT_FLAG common_obs_$model.f90
$F90 $OMP $F90_OPT $F90_DEBUG $F90_OBJECT_FLAG letkf_obs.f90
$F90 $OMP $F90_OPT $F90_DEBUG $F90_OBJECT_FLAG vars_letkf.f90
$F90 $OMP $F90_OPT $F90_DEBUG $F90_OBJECT_FLAG letkf_local.f90
$F90 $OMP $F90_OPT $F90_DEBUG $F90_OBJECT_FLAG letkf_local.o letkf_tools.f90
$F90 $OMP $F90_OPT $F90_DEBUG $F90_FPP $F90_OBJECT_FLAG letkf_local.o letkf_tools.f90
$F90 $OMP $F90_OPT $F90_DEBUG $F90_FPP $F90_OBJECT_FLAG input_nml_${model}.f90
$F90 $OMP $F90_OPT $F90_DEBUG $F90_FPP $F90_OBJECT_FLAG letkf.f90
if [[ $F90 == 'ftn' ]]; then
Expand Down
4 changes: 2 additions & 2 deletions build/make_letkf.roms.sh
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ else
LBLAS=""
fi

#F90_FPP='-fpp' # Fortran preprocessor
F90_FPP="$F90_FPP" # Fortran preprocessor

$F90 $OMP $F90_OPT $F90_DEBUG $F90_INLINE $F90_OBJECT_FLAG SFMT.f90
$F90 $OMP $F90_OPT $F90_DEBUG $F90_INLINE $F90_OBJECT_FLAG common.f90
Expand All @@ -66,7 +66,7 @@ $F90 $OMP $F90_OPT $F90_DEBUG $F90_OBJECT_FLAG letkf_obs.f90
$F90 $OMP $F90_OPT $F90_DEBUG $F90_OBJECT_FLAG vars_letkf.f90
$F90 $OMP $F90_OPT $F90_DEBUG $F90_OBJECT_FLAG kdtree.f90
$F90 $OMP $F90_OPT $F90_DEBUG $F90_OBJECT_FLAG letkf_local.f90
$F90 $OMP $F90_OPT $F90_DEBUG $F90_OBJECT_FLAG letkf_local.o letkf_tools.f90
$F90 $OMP $F90_OPT $F90_DEBUG $F90_FPP $F90_OBJECT_FLAG letkf_local.o letkf_tools.f90
$F90 $OMP $F90_OPT $F90_DEBUG $F90_FPP $F90_OBJECT_FLAG input_nml_${model}.f90
$F90 $OMP $F90_OPT $F90_DEBUG $F90_FPP $F90_OBJECT_FLAG letkf.f90
$F90 $OMP $F90_OPT $F90_DEBUG $F90_INLINE -o ${PGM} *.o $MPI_LIB $NETCDF_LIB $LBLAS
Expand Down
4 changes: 2 additions & 2 deletions build/make_letkf.sis.sh
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ else
LBLAS=""
fi

#F90_FPP='-fpp' # Fortran preprocessor
F90_FPP="$F90_FPP" # Fortran preprocessor

$F90 $OMP $F90_OPT $F90_DEBUG $F90_INLINE $F90_OBJECT_FLAG SFMT.f90
$F90 $OMP $F90_OPT $F90_DEBUG $F90_INLINE $F90_OBJECT_FLAG common.f90
Expand All @@ -68,7 +68,7 @@ $F90 $OMP $F90_OPT $F90_DEBUG $F90_OBJECT_FLAG $NETCDF_INC common_mpi_$model.f90
$F90 $OMP $F90_OPT $F90_DEBUG $F90_OBJECT_FLAG letkf_obs.f90
$F90 $OMP $F90_OPT $F90_DEBUG $F90_OBJECT_FLAG vars_letkf.f90
$F90 $OMP $F90_OPT $F90_DEBUG $F90_OBJECT_FLAG letkf_local.f90
$F90 $OMP $F90_OPT $F90_DEBUG $F90_OBJECT_FLAG letkf_local.o letkf_tools.f90
$F90 $OMP $F90_OPT $F90_DEBUG $F90_FPP $F90_OBJECT_FLAG letkf_local.o letkf_tools.f90
$F90 $OMP $F90_OPT $F90_DEBUG $F90_FPP $F90_OBJECT_FLAG input_nml_${model}.f90
$F90 $OMP $F90_OPT $F90_DEBUG $F90_FPP $F90_OBJECT_FLAG letkf.f90
$F90 $OMP $F90_OPT $F90_DEBUG $F90_INLINE -o ${PGM} *.o $MPI_LIB $NETCDF_LIB $LBLAS
Expand Down
2 changes: 1 addition & 1 deletion build/make_obsop.mom6_dynamic.sh
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ BDIR=$CDIR/build_obsop/$name.build
mkdir -p $BDIR
cd $BDIR

F90_FPP="$F90_FPP -DDYNAMIC" # Fortran preprocessor
F90_FPP="$F90_FPP -DDYNAMIC -DMOM6" # Fortran preprocessor

#===============================================================================
rm -f $BDIR/*.f90
Expand Down
2 changes: 1 addition & 1 deletion src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ else()
endif()
target_link_libraries(OCN.letkf PUBLIC ${OCNLETKF_LD_LIBS})
set_target_properties (OCN.letkf PROPERTIES Fortran_PREPROCESS ON) # Need to preprocess .f90 files for ifdef on next line
target_compile_definitions(OCN.letkf PRIVATE DYNAMIC)
target_compile_definitions(OCN.letkf PRIVATE DYNAMIC MOM6)
install(TARGETS OCN.letkf)

## Programs
Expand Down
38 changes: 25 additions & 13 deletions src/letkf/letkf_local.f90.kdtree
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ SUBROUTINE obs_local(ij,ilev,mlev,var_local,hdxf,rdiag,rloc,dep,nobsl,nobstotal)
!STEVE: debug
LOGICAL :: dodebug = .false.
INTEGER :: cnt_sst, cnt_sst0
INTEGER :: cnt_sss, cnt_sss0

!-----------------------------------------------------------------------------
! Initialize the KD-tree
Expand Down Expand Up @@ -188,8 +189,8 @@ SUBROUTINE obs_local(ij,ilev,mlev,var_local,hdxf,rdiag,rloc,dep,nobsl,nobstotal)
! scale the weight of the observation error based on distance from gridpoint.
! Outside of a maximum radius, set the obs impact to zero (i.e. remove the ob)
!-----------------------------------------------------------------------------
cnt_sst = 0
cnt_sst0 = 0
cnt_sst = 0; cnt_sst0 = 0
cnt_sss = 0; cnt_sss0 = 0
nobsl=0
do n = 1, nn
loc_h = 0.0
Expand Down Expand Up @@ -226,18 +227,23 @@ SUBROUTINE obs_local(ij,ilev,mlev,var_local,hdxf,rdiag,rloc,dep,nobsl,nobstotal)
!! vertical localization cutoff
if (dlev > dist_zero_v) CYCLE

!STEVE: (DEBUG)
if (dodebug .and. obselm(idx(n))==id_sst_obs) then
cnt_sst = cnt_sst + 1
if (dodebug) then
if (NINT(obselm(idx(n)))==id_sst_obs) then
cnt_sst = cnt_sst + 1
elseif (NINT(obselm(idx(n)))==id_sss_obs) then
cnt_sss = cnt_sss + 1
endif
endif

!! Skip surface obs below the mixed layer:
if (ilev > mlev .and. obselm(idx(n))==id_sst_obs) then
if (ilev > mlev .and. NINT(obselm(idx(n)))==id_sst_obs) then
cnt_sst0 = cnt_sst0+1
CYCLE
endif
! if (ilev > mlev .and. obselm(idx(n))==id_ssh_obs) CYCLE
! if (ilev > mlev .and. obselm(idx(n))==id_sss_obs) CYCLE
if (ilev > mlev .and. NINT(obselm(idx(n)))==id_sss_obs) then
cnt_sss0 = cnt_sss0+1
CYCLE
endif

!! Else, use this observation!
nobsl = nobsl+1
Expand All @@ -252,13 +258,19 @@ SUBROUTINE obs_local(ij,ilev,mlev,var_local,hdxf,rdiag,rloc,dep,nobsl,nobstotal)
dep(nobsl) = obsdep(idx(n))
rdiag(nobsl) = obserr(idx(n))**2

if (dodebug) WRITE(6,*) "rloc(nobsl) = ", rloc(nobsl)
if (dodebug) WRITE(6,*) "rdiag(nobsl) = ", rdiag(nobsl)
if (dodebug) WRITE(6,*) "dep(nobsl) = ", dep(nobsl)
if (dodebug) then
WRITE(6,*) "rloc(nobsl) = ", rloc(nobsl)
WRITE(6,*) "rdiag(nobsl) = ", rdiag(nobsl)
WRITE(6,*) "dep(nobsl) = ", dep(nobsl)
endif
enddo

if (dodebug) WRITE(6,*) "obs_local:: assimilated SST obs: ", cnt_sst
if (dodebug) WRITE(6,*) "obs_local:: skipped SST obs: ", cnt_sst0
if (dodebug) then
WRITE(6,*) "obs_local:: assimilated SST obs: ", cnt_sst
WRITE(6,*) "obs_local:: skipped SST obs: ", cnt_sst0
WRITE(6,*) "obs_local:: assimilated SSS obs: ", cnt_sss
WRITE(6,*) "obs_local:: skipped SSS obs: ", cnt_sss0
endif

END SUBROUTINE obs_local

Expand Down
Loading

0 comments on commit 24d4b10

Please sign in to comment.