Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 21 additions & 6 deletions src/Applications/GEOSdas_App/fvsetup
Original file line number Diff line number Diff line change
Expand Up @@ -392,6 +392,7 @@ my ($landbcs);
my ($coupled, $ores, $mometc);
my ($o_servers,$bckend_wrts, $xncpus, $ncpus_per_node);
my ($skipgsi);
my ($jedi_ensrpy, $jedi_exprpy);

my ($sysfile, $nodeflg);
my (@rmTilde);
Expand Down Expand Up @@ -2526,6 +2527,9 @@ sub ed_aens_das_replay_acq {
$replay_arcdir = "/discover/nobackup/projects/gmao/advda/rtodling/archive/x0044";
$replay_arcdir = query("Replay archive directory?", $replay_arcdir);

$jedi_ensrpy = $replay_arcdir;
$jedi_exprpy = $aens_replay_expid;

$acq = "$fvhome/$mydir/atmens_replay.acq";
open(SCRIPT,">$acq") or die ">>> ERROR <<< cannot write $acq";
print SCRIPT <<"EOF";
Expand Down Expand Up @@ -3702,20 +3706,31 @@ sub set_geosjedi {
if ( ! $ENV{GEOSJEDI} ) { return 0 };

$nogsi = " ";
if ( $skipgsi ) { $nogsi = "-nogsi" };

if( $ENV{OFFLINE_IODA_DIR} ) {
$iodadir = $ENV{OFFLINE_IODA_DIR};
if ( $skipgsi ) {
$nogsi = "-nogsi";
if( $ENV{OFFLINE_IODA_DIR} ) {
$iodadir = $ENV{OFFLINE_IODA_DIR};
} else {
# $iodadir = "/discover/nobackup/projects/gmao/dadev/rtodling/archive/541/Milan/x0050/ioda/";
$iodadir = "/discover/nobackup/projects/gmao/dadev/rtodling/archive/544/x0054/ioda/";
}
} else {
$iodadir = "/discover/nobackup/projects/gmao/dadev/rtodling/archive/541/Milan/x0050/ioda/";
$iodadir = "/dev/null"; # this expects ncdiag files to be created by GSI
# so that JEDIana can convert files to IODA on the fly
}
$xtra4jedi = "";
if ( $jedi_ensrpy ) {
$xtra4jedi = "-ensrpy $jedi_ensrpy -exprpy $jedi_exprpy";
}
$jediopts = "-fvhome $fvhome -iodadir $iodadir -archive $acqloc -gcmres $agcm_im $nogsi";
$jediopts = "-fvhome $fvhome -iodadir $iodadir -archive $acqloc -gcmres $agcm_im $nogsi $xtra4jedi";

if ( $ENV{JEDI_ATMVAR_SCHEME} ) {
$jedivar = $ENV{JEDI_ATMVAR_SCHEME};
} else {
if ( $hyb_ens < 3 ) {
$jedivar = "3dfgat";
} elsif ( $hyb_ens == 3 ) {
$jedivar = "hyb3denvar";
} else {
$jedivar = "hyb4denvar";
}
Expand Down
3 changes: 2 additions & 1 deletion src/Applications/GEOSdas_App/jedi/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
add_subdirectory(etc)

file(GLOB perlscripts *.pl)
file(GLOB pythonscripts *.py)
file(GLOB pmscripts *.pm)
file(GLOB cshscripts *.csh)

install(
PROGRAMS ${perlscripts} ${pmscripts} ${cshscripts}
PROGRAMS ${perlscripts} ${pmscripts} ${pythonscripts} ${cshscripts}
DESTINATION bin)
40 changes: 40 additions & 0 deletions src/Applications/GEOSdas_App/jedi/assemble_obs_yaml.pl
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
#!/usr/bin/perl
use strict;
use warnings;
use File::Spec;

# Need at least: dir + one file + output
die "Usage: perl combine.pl <dir> <file1> [file2 ...] <output>\n"
unless @ARGV >= 3;

my $dir = shift @ARGV; # directory
my $output_file = pop @ARGV; # last arg = output file
my @files = @ARGV; # remaining = input files

open(my $out_fh, ">", $output_file)
or die "Cannot open output file '$output_file': $!";

foreach my $file (@files) {

my $fullpath = File::Spec->catfile($dir, $file);

unless (-f $fullpath) {
warn "Skipping '$fullpath' (not found or not a regular file)\n";
next;
}

open(my $in_fh, "<", $fullpath)
or die "Cannot open file '$fullpath': $!";

print $out_fh "#==== $file ====\n"; # optional separator

while (my $line = <$in_fh>) {
print $out_fh $line;
}

close($in_fh);
}

close($out_fh);

print "Files have been combined into $output_file\n";
8 changes: 7 additions & 1 deletion src/Applications/GEOSdas_App/jedi/etc/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,14 @@ set (ALLETC
JEDIanaConfig.csh
SWELLConfig.csh
diffstates_geos.yaml
diag2ioda.yaml
geos_3dvar.yaml
geos_3dfgat.yaml
geos_hyb3dcenvar.yaml
geos_hyb4dcenvar.yaml
geos_hyb4dcenvar_seq.yaml
geos_hyb3denvar.yaml
geos_hyb4denvar.yaml
geos_jediobs.yaml
jedi_acquire_bkg.j
jedi_acquire_ebkg.j
jedi_acquire_ioda.j
Expand All @@ -24,3 +26,7 @@ install (
DESTINATION etc/jedi
)

install(
DIRECTORY obs/
DESTINATION etc/jedi/obs
)
51 changes: 51 additions & 0 deletions src/Applications/GEOSdas_App/jedi/etc/JEDIadanaConfig.csh
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# SLURM specials
setenv GEOSJEDI_QOS @GEOSJEDI_QOS
setenv GEOSJEDI_PARTITION @GEOSJEDI_PARTITION

# Top options
setenv JEDI_SET 1 # bring bkg/obs/ens
setenv JEDI_RUN 1 # run JEDI var executable
setenv JEDI_HYBRID @JEDI_HYBRID # control opts for hyb JEDI
setenv JEDI_MKIAU 1 # calculates IAU output
setenv JEDI_POST 0 # process results (move files, etc)
setenv JEDI_IAU_OVERWRITE @JEDI_IAU_OVERWRITE # overwrite GSI-IAU with JEDI-IAU (when cycling)
setenv JEDI_RUN_ADANA_TEST 0 # run adjoint JEDI-Var
setenv JEDI_VAROFFSET 10800 # background time offset
setenv JEDI_FEEDBACK_VARBC @JEDI_FEEDBACK_VARBC # controls whether or not to feedback biases

setenv JEDI_SWELLUSE 0 # bypass use of SWELL for now
setenv SWELL_INSTALL @SWELL_INSTALL
setenv OFFLINE_IODA_DIR @OFFLIODADIR # /discover/nobackup/projects/gmao/dadev/rtodling/archive/530/x0049/R2D2DataStore/Local/v2/

# Details ...
setenv MAPLFIX 0
setenv JEDI_OBS_OPT 1 # 1= point to xexp-like set (data in tar-balls; data from existing exp)
# 2= point to existing set of ncdiag-ioda-converted set (swell/.../DATE/geos_atmosphere)
# 3= generate on the fly based on GSI (nc4) diags (TBD)

setenv JEDI_ROOT @JEDI_ROOT

# Specific to run procedure
setenv JEDI_RUN_ANA 1
setenv JEDI_RUN_CNVANA 0 # convert cc ana and/or inc output to ll
setenv JEDI_RUN_GETINC @JEDI_RUN_GETINC # calc cubed inc from diff of cubed ana and bkg
setenv JEDI_RUN_UPDRST 0 # not desirable

setenv JEDI_DIF_NCPUS @JEDI_DIF_NCPUS
setenv JEDI_NCPUS @JEDI_VAR_NCPUS

setenv JEDI_ADDINC_MPIRUN "mpirun -np 12"
setenv JEDI_CNVANA_MPIRUN "mpirun -np 12"
setenv JEDI_CNVENS_MPIRUN "mpirun -np 12"
setenv JEDI_CNVINC_MPIRUN "mpirun -np 12"
setenv JEDI_GETINC_MPIRUN "mpirun -np $JEDI_DIF_NCPUS"
setenv JEDI_FV3VAR_MPIRUN "mpirun -perhost @JEDI_VAR_PERHOST -np $JEDI_NCPUS"

setenv JEDI_MKIAU_MPIRUN "mpirun "

setenv JEDI_STATIC_FILES @JEDI_STATIC_FILES
setenv JEDI_CRTM_COEFFS $FVHOME/fvInput/gsi/etc/JEDI-CRTM-2.4.1j1-GMAO/Little_Endian/
setenv JEDI_INPUT @JEDI_INPUT

# post
setenv JEDI_CONCAT_IODA 0
11 changes: 6 additions & 5 deletions src/Applications/GEOSdas_App/jedi/etc/JEDIanaConfig.csh
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,10 @@ setenv JEDI_IAU_OVERWRITE @JEDI_IAU_OVERWRITE # overwrite GSI-IAU with JEDI-I
setenv JEDI_RUN_ADANA_TEST 0 # run adjoint JEDI-Var
setenv JEDI_VAROFFSET 10800 # background time offset
setenv JEDI_FEEDBACK_VARBC @JEDI_FEEDBACK_VARBC # controls whether or not to feedback biases
# caution: not sure aircraft bias cycle properly in JEDI

setenv JEDI_SWELLUSE 0 # bypass use of SWELL for now
setenv SWELL_INSTALL @SWELL_INSTALL
setenv OFFLINE_IODA_DIR @OFFLIODADIR # /discover/nobackup/projects/gmao/dadev/rtodling/archive/530/x0049/R2D2DataStore/Local/v2/

# Details ...
Expand All @@ -22,9 +24,6 @@ setenv JEDI_OBS_OPT @JEDI_OBS_OPT # 1= point to xexp-like set (data in tar-ball
# 2= point to existing set of ncdiag-ioda-converted set (swell/.../DATE/geos_atmosphere)
# 3= generate on the fly based on GSI (nc4) diags (TBD)

setenv JEDI_GSI2IODA 0
setenv JEDI_OBS_DIR $FVWORK/IODA

setenv JEDI_ROOT @JEDI_ROOT

# Specific to run procedure
Expand All @@ -33,12 +32,14 @@ setenv JEDI_RUN_CNVANA 0 # convert cc ana and/or inc output to ll
setenv JEDI_RUN_GETINC @JEDI_RUN_GETINC # calc cubed inc from diff of cubed ana and bkg
setenv JEDI_RUN_UPDRST 0 # not desirable

setenv JEDI_DIF_NCPUS @JEDI_DIF_NCPUS
setenv JEDI_NCPUS @JEDI_VAR_NCPUS

setenv JEDI_ADDINC_MPIRUN "mpirun -np 12"
setenv JEDI_CNVANA_MPIRUN "mpirun -np 12"
setenv JEDI_CNVENS_MPIRUN "mpirun -np 12"
setenv JEDI_CNVINC_MPIRUN "mpirun -np 12"
setenv JEDI_GETINC_MPIRUN "mpirun -np @JEDI_DIF_NTASKS"
setenv JEDI_NCPUS @JEDI_VAR_NCPUS
setenv JEDI_GETINC_MPIRUN "mpirun -np $JEDI_DIF_NCPUS"
setenv JEDI_FV3VAR_MPIRUN "mpirun -perhost @JEDI_VAR_PERHOST -np $JEDI_NCPUS"

setenv JEDI_MKIAU_MPIRUN "mpirun "
Expand Down
13 changes: 2 additions & 11 deletions src/Applications/GEOSdas_App/jedi/etc/SWELLConfig.csh
Original file line number Diff line number Diff line change
@@ -1,11 +1,2 @@

#source /discover/nobackup/projects/gmao/advda/swell/jedi_modules/spackstack_1.9_intel_bundle

module use -a /discover/nobackup/projects/gmao/advda/swell/dev/modulefiles/core
module load py_lmod_installer

module use /discover/nobackup/projects/gmao/advda/rtodling/JEDI1/SWELL/SPACK19/opt/modulefiles/core
module load swell/Mar18

#module unload py-pycodestyle/2.8.0

module use $SWELL_INSTALL/modulefiles/core
module load swell/swell
134 changes: 134 additions & 0 deletions src/Applications/GEOSdas_App/jedi/etc/diag2ioda.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,134 @@
# What is the experiment id?
experiment_id: ${EXPID}-convert_ncdiags

# What is the experiment root (the directory where the experiment will be stored)?
experiment_root: $JEDIWORK

# What is the time of the first cycle (middle of the window)?
start_cycle_point: '$JEDI_ISO_DATE_ANA'

# What is the time of the final cycle (middle of the window)?
final_cycle_point: '$JEDI_ISO_DATE_ANA'

# List of models in this experiment
model_components:
- geos_atmosphere

# Set the Cylc runahead limit: the maximum number of cycles that may be active ahead of the current cycle (e.g. P1: up to 1 cycle ahead, P3: up to 3 cycles ahead, default P4).
runahead_limit: P4

# What experiment_id should r2d2 reference for experiment?
r2d2_experiment_id: swell-convert_ncdiags

# Skip registering and storing results of this experiment in R2D2?
skip_r2d2: false

# Do you want to use an existing JEDI build or create a new build?
jedi_build_method: use_existing

# What is the path to the existing JEDI build directory?
existing_jedi_build_directory: $JEDI_ROOT

# What is the path to the existing JEDI source code directory?
existing_jedi_source_directory: $JEDI_ROOT/../

# Configurations for the model components.
models:

# Configuration for the geos_atmosphere model component.
geos_atmosphere:

# Enter the cycle times for this model.
cycle_times:
- T00
- T06
- T12
- T18

# What is the location where GSI bias correction files can be found?
path_to_gsi_bc_coefficients: $JEDIWORK/GSIBIAS/*bias*%Y%m%d_%Hz.txt

# What is the duration for the data assimilation window?
window_length: PT6H

# What is the path to where the GSI ncdiags are stored?
path_to_gsi_nc_diags: $JEDIWORK/GSIDIAGS

# Which observations do you want to include?
observations:
- abi_g16
- abi_g18
- aircraft
- airs_aqua
- amsr2_gcom-w1
- amsua_aqua
- amsua_metop-b
- amsua_metop-c
- amsua_n15
- amsua_n18
- amsua_n19
- atms_n20
- atms_n21
- atms_npp
- avhrr3_metop-b
- avhrr3_metop-c
- avhrr3_n18
- avhrr3_n19
- cris-fsr_n20
- cris-fsr_n21
- cris-fsr_npp
- gmi_gpm
- gps
- iasi_metop-b
- iasi_metop-c
- mhs_metop-b
- mhs_metop-c
- mhs_n19
- mls55_aura
- omi_aura
- omieff_aura
- ompslpnc_n21
- ompslpnc_npp
- ompsnm_npp
- pibal
- satwind
- scatwind
- sfcship
- sfc
- sondes
- ssmis_f17

# When running the ncdiag to ioda converted do you want to produce GeoVaLs files?
produce_geovals: false

# Is it a single-observation test?
single_observations: false

# Provide a list of patterns that you wish to remove from the cycle directory.
clean_patterns:
- gsi_bcs/*.nc4
- gsi_bcs/*.txt
- gsi_bcs/*.yaml
- gsi_bcs
- gsi_ncdiags/*.nc4
- gsi_ncdiags/aircraft/*.nc4
- gsi_ncdiags/aircraft
- gsi_ncdiags

# How long before the middle of the analysis window did the background providing forecast begin?
background_time_offset: PT9H

# What is the path to the CRTM coefficient files?
crtm_coeff_dir: $JEDI_CRTM_COEFFS

# What is the path to the Swell formatted observing system records?
observing_system_records_path: None

# Datetime this file was created (auto added)
datetime_created: 20260331_163310Z

# Computing platform to run the experiment
platform: nccs_discover_sles15

# Record of the suite being executed
suite_to_run: convert_ncdiags
5 changes: 3 additions & 2 deletions src/Applications/GEOSdas_App/jedi/etc/geos_3dfgat.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -106,13 +106,14 @@ cost function:
# mole_fraction_of_carbon_dioxide_in_air: co2
background error:
covariance model: SABER
# covariance type: gsi static covariance
# adjoint test: true
saber central block:
saber block name: gsi hybrid covariance
read:
gsi akbk: ./fv3-jedi/fv3files/akbk@JEDI_BKG_VRES.nc4
gsi error covariance file: ./fv3-jedi/gsibec/gsibec_coefficients_c@JEDI_BKGCOV_RESOL.nc4
gsi berror namelist file: ./fv3-jedi/gsibec/cli_gsibec_configuration_c@JEDI_BKGCOV_RESOL.nml
gsi error covariance file: ./fv3-jedi/gsibec/gsibec_coefficients_l@JEDI_BKG_VRESx@JEDI_GSIBEC_NLONy@JEDI_GSIBEC_NLAT.nc4
gsi berror namelist file: ./fv3-jedi/gsibec/gsibec_configuration_l@JEDI_BKG_VRESx@JEDI_GSIBEC_NLONy@JEDI_GSIBEC_NLAT.nml
processor layout x direction: @JEDI_VAR_GSIXLAYOUT
processor layout y direction: @JEDI_VAR_GSIYLAYOUT
debugging mode: false
Expand Down
Loading
Loading