Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
171 commits
Select commit Hold shift + click to select a range
786e994
Merge pull request #1 from CFMIP/master
jshaw35 Jan 30, 2023
0661032
added .gitignore
jshaw35 Jan 30, 2023
4799f36
Merge branch 'CFMIP:master' into master
jshaw35 Feb 6, 2023
633e2e1
pre-pull commit
jshaw35 Feb 6, 2023
927441d
Merge branch 'master' of https://github.com/jshaw35/COSPv2.0
jshaw35 Feb 6, 2023
071a6c3
Create rttov input/output test files and the RTTOV v13 code files.
jshaw35 Feb 7, 2023
11e9218
Makefile now points to rttov_v13 COSP files.
jshaw35 Feb 7, 2023
7b95061
makefile works without RTTOV but does not yet include RTTOV dependenc…
jshaw35 Feb 8, 2023
893cf60
first attempt to make cosp_rttov_interface_v13 conditionally dependen…
jshaw35 Feb 9, 2023
6279ced
Make COSP conditionally dependent on cosp_rttov_v13 and thus the RTTO…
jshaw35 Feb 9, 2023
0d02f64
Makefile now builds with the condtionally dependent cosp_rttov_interf…
jshaw35 Feb 9, 2023
13bd0a2
Makefile progress after meeting with Dustin
jshaw35 Feb 17, 2023
17ad877
Makefile is nearly final, some junk at the bottom, removed previously…
jshaw35 Feb 20, 2023
3bfaddd
Removed conditional dependence on environment variables since the Mak…
jshaw35 Feb 21, 2023
7f65750
Removed remaining #ifdef statements
jshaw35 Feb 21, 2023
cee901f
typo in comment
jshaw35 Feb 28, 2023
3e06930
I made changes to “cosp.F90” and “cosp2_test.F90” so that the cosp_in…
jshaw35 Feb 28, 2023
7fe34d5
Update STUB to work with changes to cosp_rttov_init and cosp.F90
jshaw35 Feb 28, 2023
97c25ff
Cleaned cosp_rttov_v13 of old code.
jshaw35 Feb 28, 2023
57d0cc4
Added option setting and coefficient file loading to cosp_rttov_init.…
jshaw35 Feb 28, 2023
e34833e
Call cosp_rttov_simulate from cosp.F90. Call goes through cosp_rttov_…
jshaw35 Feb 28, 2023
7911cda
Begin reading COSP inputs to RTTOV columns in cosp_rttov_interface_v13.
jshaw35 Mar 1, 2023
9bdb8e1
Corrected tca variable description
jshaw35 Mar 1, 2023
845920e
Keep STUB files functioning.
jshaw35 Mar 1, 2023
1b84171
All steps of running RTTOV are in a single function "simulate_rttov" …
jshaw35 Mar 3, 2023
e0f4b75
Move rttov_IN defined data type to cosp_rttov_XX.F90.
jshaw35 Mar 7, 2023
c1bade1
fix trace gas profile set-up
jshaw35 Mar 7, 2023
6753678
Broke up and moved steps for running RTTOV to cosp_rttov_v13
jshaw35 Mar 7, 2023
2896be6
Clean up old dependencies in rttov_interface_v13
jshaw35 Mar 7, 2023
03b507e
Building without errors with RTTOV.
jshaw35 Mar 7, 2023
43868e1
Compiling with RTTOV. Makefile cleaned up.
jshaw35 Mar 7, 2023
95e3f59
Add RTTOV input and output namelist options.
jshaw35 Mar 9, 2023
97319c5
Remember to deallocate coef memory at end of run.
jshaw35 Mar 9, 2023
fc0a5eb
Allow user to specify some RTTOV options from the namelist
jshaw35 Mar 13, 2023
baaa964
Infrastructure for using a rttov_init_in object in place but not in use.
jshaw35 Mar 13, 2023
c5b73b9
print statements for RTTOV runtime added, not tested
jshaw35 Mar 13, 2023
69fd86c
Added infrastructure for passing an RTTOV namelist filename into cosp…
jshaw35 Mar 14, 2023
979199b
Added RTTOV input namelist. Added RTTOV inputs to COSP column input.
jshaw35 Mar 17, 2023
dea4ae0
RTTOV working, no clean up or checks yet.
jshaw35 Mar 21, 2023
24d6e7e
Add RTTOV brightness temperatures as an output.
jshaw35 Mar 22, 2023
1b22d54
Add options and code for BT, radiance, and reflectivity outputs
jshaw35 Mar 23, 2023
f4c0d5d
Update .gitignore to ignore anything in a .ipynb_checkpoints/ directory
jshaw35 Mar 23, 2023
0488632
Added degree of parallelization via the namelist
jshaw35 Mar 23, 2023
e82feb8
Reorganization of namelist and GCM input handling
jshaw35 Mar 27, 2023
0630aef
COSP-RTTOV reorg part 2
jshaw35 Mar 28, 2023
9b842f9
Separate output saving and profile deallocation into separate subrout…
jshaw35 Apr 3, 2023
147d187
remove duplicate deallocation of RTTOV coefficients in cosp_rttov_dea…
jshaw35 Apr 3, 2023
70ef680
Draft of PC-RTTOV code
jshaw35 Apr 4, 2023
3c7c28e
Namelist file updates for PC-RTTOV
jshaw35 May 4, 2023
8f65dfd
Added PC-RTTOV functionality. Not fully operational yet.
jshaw35 May 4, 2023
83a54e2
PC-RTTOV specific namelist inputs added
jshaw35 May 4, 2023
2a90462
PC-RTTOV and channel indexing functioning
jshaw35 May 11, 2023
524b08f
Clean up and handling of nchannel_rec options in non-PC-RTTOV calls.
jshaw35 May 11, 2023
2508520
Polishing changes before multi-instrument integration
jshaw35 May 11, 2023
7134fc3
Initial progress on multi-instrument implementaton.
jshaw35 May 12, 2023
71c47b0
Progress towards multi-instrument RTTOV implementation.
jshaw35 May 20, 2023
731739b
progress on multi-instrument RTTOV with multi-instrument output DDT i…
jshaw35 May 21, 2023
33e5d3e
initial functioning code for multi-instrument implementation. Still g…
jshaw35 May 23, 2023
b147c58
Removed old coding writing RTTOV output to netcdf
jshaw35 May 23, 2023
3954373
Single-instrument RTTOV calls commented out
jshaw35 May 23, 2023
c4104b6
Old single-instrument routines removed from cosp_rttov_interface_v13 …
jshaw35 May 23, 2023
0f0dd07
single instrument rttov init calls removed
jshaw35 May 24, 2023
fbc1d4a
Clean up RTTOV DDTs to remove single instrument fields.
jshaw35 May 24, 2023
383ac08
Remove old namelist dependencies, update STUB functionality, correct …
jshaw35 Jun 5, 2023
e9ad467
new branch for CESM2.2 integration
jshaw35 Jun 7, 2023
6c3683d
added tag and modified instrument 2 COSP-RTTOV namelist
jshaw35 Jun 9, 2023
e7882e5
Updates with multi-chunk functionality.
jshaw35 Jun 23, 2023
e416de2
Update STUB file functionality
jshaw35 Jun 26, 2023
814ea16
Flexible multi-instrument RTTOV namelist inputs working!
jshaw35 Jun 30, 2023
2f016a3
Clean up
jshaw35 Jul 18, 2023
6efc013
Add CESM unitn I/O functionality
jshaw35 Jul 18, 2023
62c6796
Old namelist clean-up for multifile namelist I/O
jshaw35 Jul 18, 2023
87442f3
Modify character length of instrument namelist objects and add print …
jshaw35 Jul 19, 2023
36ab303
Add namelist inputs for RTTOV instruments to control sampling time swath
jshaw35 Aug 2, 2023
3fed030
Initial interfacing of time and user input variables for orbit swath …
jshaw35 Aug 3, 2023
c291165
cosp_rttov_allocate interface complete but functionality not added yet
jshaw35 Aug 4, 2023
f6e8d5d
Swathing implemented in non-PC-RTTOV subroutines. PC subroutines unde…
jshaw35 Aug 4, 2023
8582da4
Swathing implementation done! In both standard an PC RTM calls. Non-o…
jshaw35 Aug 7, 2023
70d9061
Subroutine clean-up and simplifying
jshaw35 Aug 7, 2023
e2ed648
Updates for chunked functionality.
jshaw35 Aug 7, 2023
b5c9c06
Comment out sfc_emis and sfc_refl variables. Enable trace gas columns.
jshaw35 Aug 9, 2023
9855292
Add deallocate RTTOV Config DDT function and integration.
jshaw35 Aug 11, 2023
b2c3c45
Add debugging functionality in profile set-up for CESM
jshaw35 Aug 14, 2023
d4cc126
Only assign trace gas profiles if specified in instrument namelist to…
jshaw35 Aug 15, 2023
b44d2e3
reorganize COSP_RTTOV_SIMULATE to not require all outputs
jshaw35 Aug 15, 2023
4d3e13a
Add tca (cloud fraction) to the error check subroutine
jshaw35 Aug 15, 2023
e427b8c
Added functional print statement via the namelist option rttov_verbose
jshaw35 Aug 17, 2023
d3937c6
Compatibility with STUB files and a small change to rttov_cfg dealloc…
jshaw35 Aug 21, 2023
e65345c
Make the "rttov_output" DDT allocatable rather than a pointer. Data a…
jshaw35 Aug 22, 2023
ae145e0
RTTOV SZA and surface mask implementation. Also create t2m and q2m va…
jshaw35 Aug 29, 2023
57ee3ad
Integrate effective radius values for cloud ice and cloud water into …
jshaw35 Sep 7, 2023
2c5fc69
Added greybody emissivity functionality and handled mismatches in glo…
jshaw35 Sep 11, 2023
80c4e53
Update and add CESM2 driver code.
jshaw35 Sep 18, 2023
b740de0
New test instrument namelist demonstrating channel subsetting.
jshaw35 Sep 27, 2023
567b6e3
Updates to testing namelist files
jshaw35 Sep 27, 2023
29d3e1b
First attempt at solar (VIS/NIR) implementation. Not getting expected…
jshaw35 Sep 27, 2023
8a79c94
Minor updates
jshaw35 Oct 17, 2023
caf9d6c
Include necessary objects and links for RTTOV-scatt
jshaw35 Oct 17, 2023
dfe7a68
Cleaned up print statements and old "month" and "time_frac" variables.
jshaw35 Nov 7, 2023
c117185
Updated swathing to read from new date and time arrays.
jshaw35 Nov 7, 2023
2ffece3
Update functioning code before threading fix
jshaw35 Nov 21, 2023
266cd14
Shifted RTTOV variables into subroutine calls for thread-safe operati…
jshaw35 Nov 22, 2023
4ae0d11
Another attempt at thread-safe changes...
jshaw35 Nov 22, 2023
a740198
Port COSP2 Makefiles to Derecho. No HDF5 install.
jshaw35 Jan 11, 2024
fd48359
Namelist + other inputs changes for CESM2 AGU sims
jshaw35 Jan 11, 2024
b32f159
Fix spectral axis labeling in offline COSP2
jshaw35 Jan 11, 2024
c4d6cd0
Separate coefficient dealloc from RTTOV run
jshaw35 Jan 15, 2024
153ee03
Update stub to work with externalized deallocation
jshaw35 Jan 16, 2024
4d5c4b9
Derecho/RTTOV corrections
jshaw35 Jan 26, 2024
1b58f37
Initial non-RTTOV swathing implementation. Post-COSP in driver.
jshaw35 Jan 26, 2024
e9d6fd4
Inital code with ISCCP swathing working, need to extend to other simu…
jshaw35 Jan 31, 2024
9adad1e
Swathing working for chunked and unchunked input.
jshaw35 Feb 20, 2024
109dd99
Swathing skips when chunks are empty. Plus code cleaned up.
jshaw35 Feb 21, 2024
5ae38ff
Clean up swathing in RTTOV. Skip allocation if swath is empty.
jshaw35 Feb 27, 2024
3c7d9be
Small updates
jshaw35 Mar 21, 2024
25a085b
Remove memory leak. Reorganize swathing.
jshaw35 Mar 22, 2024
4523f2b
Add namelist for IASI simulation (validation again RRTMG-LW)
jshaw35 Apr 23, 2024
a1c0ccb
Add true surface pressure field to input handling and RTTOV calls.
jshaw35 Apr 23, 2024
1701995
Force RTTOV correctly with levels vs. layers. Some comment clean up s…
jshaw35 Apr 24, 2024
0737e96
Add options for NLTE corrections and cloud water mixing ratio setting…
jshaw35 May 8, 2024
6879d1a
Add lots of namelist files for validation against RRTMG and SARTA.
jshaw35 May 8, 2024
4c1d159
Add CAM-like addition of over-model layer for RTTOV.
jshaw35 May 10, 2024
52eeedd
Correction to cloud fields by layer instead of level.
jshaw35 May 12, 2024
802d0cf
Syntax correction and namelist updates.
jshaw35 May 12, 2024
151644c
Add simple daily offsets to swath local times in order to avoid strip…
jshaw35 Aug 14, 2024
a2a1141
Applying swath striping fix to standard COSP2 outputs.
jshaw35 Aug 14, 2024
9ab32b9
Flexibly handle gas units, specifically MMR over dry air as in CESM2.
jshaw35 Aug 27, 2024
451c024
Update instrument namelists for CESM2 with correct trace gas units va…
jshaw35 Aug 28, 2024
15e7824
Apply other CAM-like details when extend_atmos = 1
jshaw35 Sep 22, 2024
2f3aa9e
Update RTTOV instrument namelists with CAM-like extend_atmos
jshaw35 Sep 22, 2024
283dd1f
Enable user input to determine cloud optics schemes used by RTTOV
jshaw35 Sep 22, 2024
f082a89
Update namelists with the best cloud optics schemes for SCAM agreemen…
jshaw35 Sep 24, 2024
136064c
Minor changes before hunting for a memory leak
jshaw35 Oct 15, 2024
d01f1ae
Add error checks in profile set-up
jshaw35 Oct 15, 2024
26d0abe
Picky changes about indexing and a few print statements for memory le…
jshaw35 Oct 21, 2024
0375a17
AIRS namelist files for swathing with correct cloud optics schemes.
jshaw35 Oct 21, 2024
731b7c6
Namelist files for memory leak testing. Run with ./cosp2_test cosp2_i…
jshaw35 Oct 21, 2024
22edcd5
Correct RTTOV object types
jshaw35 Dec 17, 2024
61ed0f2
Swathing moved to simulator interfaces and consequent reorganization …
jshaw35 Jun 27, 2025
86f691c
Merge branch 'cosp_reference' of https://github.com/jshaw35/COSPv2.0 …
Jul 1, 2025
c9e169f
Synced w/ master
Jul 1, 2025
cd281b1
A few tiny bugs. Passing offline RTs
Jul 1, 2025
a1ea165
Add Macro to Makefile
Jul 1, 2025
82f7f4c
Changes to rttov options in driver
Jul 1, 2025
a5bf6bb
Changes to rttov options. Again...
Jul 1, 2025
f530c09
Update global snapshot nml to turn off RTTOV
Jul 1, 2025
26995b3
Test if error is dependent on chunk size
jshaw35 Jul 1, 2025
1dd9eb5
Bugfix for MODIS sunlit pressure array
Jul 2, 2025
0893c64
Revert chunk size change
Jul 2, 2025
5d85ed5
Revert change in modis pressure subsetting
Jul 2, 2025
8dbc441
Revert change in modis pressure subsetting
Jul 2, 2025
c056234
Merge branch 'feature/cosp_rrtov_swathing' of https://github.com/dust…
jshaw35 Jul 2, 2025
ccb1c0f
Correct modisIN%pres allocation and assignment
jshaw35 Jul 2, 2025
6d1ab20
Clean up old swathing variables, remove unused Lrttov_subcolumn logic…
jshaw35 Jul 2, 2025
343d3b2
Correct commented RTTOV fields in input namelist files used for CI.
jshaw35 Jul 2, 2025
d10be9f
Simplify RTTOV namelist logic by only requiring changes to the input …
jshaw35 Jul 2, 2025
d88250a
Merge remote-tracking branch 'upstream/master' into feature/cosp_rrto…
jshaw35 Jul 14, 2025
0dc70c4
Rename masking/assignment routines
jshaw35 Jul 16, 2025
6162bb4
Add swathing consistent handling of CALIPSO, CloudSat, and PARASOL ou…
jshaw35 Jul 16, 2025
e2afae9
Merge branch 'feature/cosp_rrtov_swathing' of https://github.com/dust…
jshaw35 Jul 16, 2025
9d27eb1
Merge branch 'feature/cosp_rrtov_swathing' of https://github.com/dust…
jshaw35 Jul 17, 2025
8a2119f
Merge remote-tracking branch 'upstream/KGOs_5_6' into feature/cosp_rr…
jshaw35 Jul 19, 2025
2ff2dc1
update kgo versions for CI
jshaw35 Jul 21, 2025
d030e41
merge with KGOs_5_6
jshaw35 Aug 24, 2025
8986cd3
pull in CFMIP master branch before PR
jshaw35 Sep 3, 2025
55096d1
remove nchan reference
jshaw35 Sep 3, 2025
a83824e
Remove non-essential namelist fields and old rttov interface files.
jshaw35 Sep 3, 2025
a8e61ad
Revert MODIS joint optical thickness Reff histograms for kgo check
jshaw35 Sep 3, 2025
acaf724
Merge branch 'feature/cosp_rrtov_swathing' of https://github.com/dust…
jshaw35 Sep 3, 2025
4d6ac8d
Add namelist to test swathing and update CI scripts. Still need updat…
jshaw35 Sep 12, 2025
9a8f9d9
Add swathed output files to tarball. Ready fro KGO update to v007
Sep 26, 2025
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
12 changes: 11 additions & 1 deletion .github/workflows/containerized-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ jobs:
cd driver/run
./cosp2_test cosp2_input_nl.txt
./cosp2_test cosp2_input_nl.um_global.txt
./cosp2_test cosp2_swath_input_nl.um_global.txt
###############################################################################
# Compare results against known good outputs. As above,
# we split it in as many steps as tests.
Expand All @@ -99,6 +100,15 @@ jobs:
TST=data/outputs/UKMO/cosp2_output.um_global.nc
STATS=data/outputs/UKMO/cosp2_output.um_global.${{ matrix.compiler }}.out
python compare_to_kgo.py ${KGO} ${TST} --atol=${ATOL} --rtol=${RTOL} --stats_file=${STATS}
# 3. UM global snapshot with swathing.
- name: UM global with swathing against known good output (KGO)
if: always()
run: |
cd driver
KGO=data/outputs/UKMO/cosp2_output.um_global.${{ matrix.compiler }}.kgo.$KGO_VERSION.nc
TST=data/outputs/UKMO/cosp2_swath_output.um_global.nc
STATS=data/outputs/UKMO/cosp2_output.um_global.${{ matrix.compiler }}.out
python compare_to_kgo.py ${KGO} ${TST} --atol=${ATOL} --rtol=${RTOL} --stats_file=${STATS}
###############################################################################
# Produce plots when it fails during global snapshot tests,
# and create a tarball with outputs.
Expand All @@ -112,7 +122,7 @@ jobs:
fi
cd data/outputs/UKMO
tar --ignore-failed-read -czf outputs.${{ matrix.compiler }}.UKMO.tgz cosp2_output.um_global.nc \
cosp2_output_um.nc *.png cosp2_output*.${{ matrix.compiler }}.out
cosp2_output_um.nc cosp2_swath_output.um_global.nc *.png cosp2_output*.${{ matrix.compiler }}.out
ls -lh
###############################################################################
# Make output files available if any test fails
Expand Down
11 changes: 10 additions & 1 deletion .github/workflows/continuous_integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ jobs:
cd driver/run
./cosp2_test cosp2_input_nl.txt
./cosp2_test cosp2_input_nl.um_global.txt
./cosp2_test cosp2_swath_input_nl.um_global.txt
# 2. UM global snapshot. Diagnostics on model levels.
- name: UM global snapshot. Diagnostics on model levels.
run: |
Expand Down Expand Up @@ -134,6 +135,14 @@ jobs:
KGO=data/outputs/UKMO/cosp2_output.um_global_model_levels.${F90_SHORT_NAME}.kgo.$KGO_VERSION.nc
TST=data/outputs/UKMO/cosp2_output.um_global_model_levels.nc
python compare_to_kgo.py ${KGO} ${TST} --atol=${ATOL} --rtol=${RTOL}
# 4. UM global snapshot.
- name: UM global with swathing against known good output (KGO)
if: always()
run: |
cd driver
KGO=data/outputs/UKMO/cosp2_output.um_global.${F90_SHORT_NAME}.kgo.$KGO_VERSION.nc
TST=data/outputs/UKMO/cosp2_swath_output.um_global.nc
python compare_to_kgo.py ${KGO} ${TST} --atol=${ATOL} --rtol=${RTOL}
###############################################################################
# Produce plots when it fails during global snapshot tests,
# and create a tarball with outputs.
Expand All @@ -151,7 +160,7 @@ jobs:
fi
cd data/outputs/UKMO
tar --ignore-failed-read -czf outputs.${{ matrix.compiler }}.UKMO.tgz cosp2_output.um_global.nc \
cosp2_output_um.nc cosp2_output.um_global_model_levels.nc *.png \
cosp2_output_um.nc cosp2_swath_output.um_global.nc cosp2_output.um_global_model_levels.nc *.png \
cosp2_output.um_global.out
ls -lh
###############################################################################
Expand Down
90 changes: 69 additions & 21 deletions build/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,13 @@ ISCCP_PATH = $(SIM_PATH)/icarus
MISR_PATH = $(SIM_PATH)/MISR_simulator
MODIS_PATH = $(SIM_PATH)/MODIS_simulator
PARASOL_PATH = $(SIM_PATH)/parasol

# Makefile.rttov needed to define the following:
# RTTOVDIR, FFLAGS, LIBDIR, LIBS, LLIBS, LDFLAGS_NETCDF, LDFLAGS_HDF5, LDFLAGS_ARCH
ifdef RTTOV
include Makefile.rttov
endif

VPATH = $(SRC_PATH):$(HOOKS):$(SIM_PATH):$(RT_PATH):$(RS_PATH):$(CS_PATH):$(ISCCP_PATH):$(MISR_PATH):$(MODIS_PATH):$(PARASOL_PATH)

# Example subcolumn generaton and mapping to optical properties, following COSP 1.4
Expand All @@ -26,6 +33,11 @@ LDFLAGS += $(NC_LIB) -lnetcdff

LDFLAGS += -L. -lcosp -lsubcol

# Need additional load flags from Makefile.rttov when linking to RTTOV. May remove with improved linking.
ifdef RTTOV
LDFLAGS += $(LLIBS) $(LDFLAGS_NETCDF) $(LDFLAGS_HDF5) $(LDFLAGS_ARCH) $(LDFLAGS_LAPACK)
endif

# Rules
%.o: %.F90
$(F90) $(F90FLAGS) -c $<
Expand All @@ -34,19 +46,37 @@ LDFLAGS += -L. -lcosp -lsubcol
$(F90) $(F90FLAGS) -c $<

%: %.o
$(F90) $(F90FLAGS) -o $@ $^ $(LDFLAGS) $(LIBS)
$(F90) $(F90FLAGS) -o $@ $^ $(LDFLAGS)

# Special rules for the RTTOV files.
cosp_rttov_interface_v13.o : cosp_rttov_interface_v13.F90
$(F90) $(F90FLAGS) $(FFLAGS) -c $<

cosp_rttov_v13.o : cosp_rttov_v13.F90
$(F90) $(F90FLAGS) $(FFLAGS) -c $<

cosp_rttov_util.o : cosp_rttov_util.F90
$(F90) $(F90FLAGS) $(FFLAGS) -c $<
#
# The COSP library
#
COSP_OBJS = cosp.o cosp_config.o cosp_stats.o cosp_constants.o cosp_errorHandling.o cosp_kinds.o \
cosp_isccp_interface.o icarus.o cosp_misr_interface.o MISR_simulator.o \
cosp_modis_interface.o modis_simulator.o cosp_parasol_interface.o parasol.o \
cosp_calipso_interface.o lidar_simulator.o cosp_cloudsat_interface.o quickbeam.o \
cosp_rttov_interfaceSTUB.o cosp_rttovSTUB.o cosp_grLidar532_interface.o cosp_atlid_interface.o
cosp_grLidar532_interface.o cosp_atlid_interface.o

# Add RTTOV files appropriately.
ifdef RTTOV
COSP_OBJS += cosp_rttov_interface_v13.o cosp_rttov_v13.o cosp_rttov_util.o
else
COSP_OBJS += cosp_rttov_interfaceSTUB.o cosp_rttovSTUB.o cosp_rttov_utilSTUB.o
endif


LIBRARY = libcosp.a

# Jonah tried to link in RTTOV to libcosp.a rather than cosp2_test. It didn't work.
$(LIBRARY): $(COSP_OBJS)
ar -rvs $(LIBRARY) $(COSP_OBJS)

Expand All @@ -62,44 +92,62 @@ driver:
make cosp2_test
mv cosp2_test ../driver/run

# Dependencies for libary
cosp.o : cosp_kinds.o cosp_modis_interface.o cosp_constants.o cosp_rttov_interfaceSTUB.o \
cosp_misr_interface.o cosp_isccp_interface.o cosp_calipso_interface.o \
cosp_cloudsat_interface.o cosp_stats.o \
cosp_parasol_interface.o cosp_rttovSTUB.o \
cosp_rttov_interfaceSTUB.o quickbeam.o MISR_simulator.o lidar_simulator.o \
parasol.o icarus.o cosp_grLidar532_interface.o cosp_atlid_interface.o
# Dependencies for normal COSP libary
cosp.o : cosp_kinds.o cosp_modis_interface.o cosp_constants.o \
cosp_misr_interface.o cosp_isccp_interface.o cosp_calipso_interface.o \
cosp_cloudsat_interface.o cosp_stats.o \
cosp_parasol_interface.o \
quickbeam.o MISR_simulator.o lidar_simulator.o \
parasol.o icarus.o cosp_grLidar532_interface.o cosp_atlid_interface.o

# Conditionally add dependencies on the STUB or actual RTTOV simulator.
ifdef RTTOV
cosp.o : cosp_rttov_interface_v13.o cosp_rttov_v13.o cosp_rttov_util.o
cosp_stats.o : cosp_kinds.o cosp_config.o cosp_constants.o cosp_rttov_util.o
else
cosp.o : cosp_rttov_interfaceSTUB.o cosp_rttovSTUB.o cosp_rttov_utilSTUB.o
cosp_stats.o : cosp_kinds.o cosp_config.o cosp_constants.o cosp_rttov_utilSTUB.o
endif

cosp_constants.o : cosp_kinds.o
cosp_config.o : cosp_kinds.o
cosp_errorHandling.o : cosp_kinds.o
cosp_stats.o : cosp_kinds.o cosp_config.o cosp_constants.o
cosp_isccp_interface.o : cosp_kinds.o icarus.o
icarus.o : cosp_kinds.o cosp_constants.o cosp_stats.o
cosp_misr_interface.o : cosp_kinds.o
cosp_isccp_interface.o : cosp_kinds.o icarus.o cosp_stats.o
icarus.o : cosp_kinds.o cosp_constants.o cosp_stats.o
cosp_misr_interface.o : cosp_kinds.o cosp_stats.o
MISR_simulator.o : cosp_kinds.o cosp_config.o cosp_stats.o
cosp_modis_interface.o : cosp_kinds.o cosp_config.o modis_simulator.o
cosp_modis_interface.o : cosp_kinds.o cosp_config.o modis_simulator.o cosp_stats.o
modis_simulator.o : cosp_kinds.o cosp_config.o cosp_stats.o
cosp_parasol_interface.o : cosp_kinds.o
cosp_parasol_interface.o : cosp_kinds.o cosp_stats.o
parasol.o : cosp_kinds.o cosp_config.o cosp_constants.o
cosp_calipso_interface.o : cosp_kinds.o lidar_simulator.o
cosp_calipso_interface.o : cosp_kinds.o lidar_simulator.o cosp_stats.o
lidar_simulator.o : cosp_kinds.o cosp_config.o cosp_stats.o
cosp_grLidar532_interface.o : cosp_kinds.o
cosp_atlid_interface.o : cosp_kinds.o
cosp_cloudsat_interface.o : cosp_kinds.o cosp_config.o quickbeam.o
cosp_grLidar532_interface.o : cosp_kinds.o cosp_stats.o
cosp_atlid_interface.o : cosp_kinds.o cosp_stats.o
cosp_cloudsat_interface.o : cosp_kinds.o cosp_config.o quickbeam.o cosp_stats.o
quickbeam.o : cosp_kinds.o cosp_stats.o
cosp_rttov_interfaceSTUB.o : cosp_kinds.o cosp_config.o cosp_rttovSTUB.o

# RTTOV Simulator code dependencies (only one interface and one RTTOV simulator are used at a time)
cosp_rttov_interface_v13.o : cosp_kinds.o cosp_config.o cosp_rttov_v13.o cosp_rttov_util.o
cosp_rttov_v13.o : cosp_kinds.o cosp_config.o cosp_constants.o
cosp_rttov_interfaceSTUB.o : cosp_kinds.o cosp_config.o cosp_rttovSTUB.o cosp_rttov_utilSTUB.o
cosp_rttovSTUB.o : cosp_kinds.o cosp_config.o cosp_constants.o
# RTTOV utility code dependencies
cosp_rttov_util.o : cosp_kinds.o
cosp_rttov_utilSTUB.o : cosp_kinds.o


# Example subcolumn generaton and mapping to optical properties, following COSP 1.4
SUBCOL_OBJS = mo_rng.o scops.o prec_scops.o cosp_utils.o cosp_optics.o quickbeam_optics.o array_lib.o math_lib.o mrgrnk.o optics_lib.o cosp_errorHandling.o
libsubcol.a: $(SUBCOL_OBJS) libcosp.a
ar -rvs libsubcol.a $(SUBCOL_OBJS)


array_lib.o : cosp_kinds.o
mrgrnk.o : cosp_kinds.o
math_lib.o : cosp_kinds.o cosp_errorHandling.o
optics_lib.o : cosp_kinds.o cosp_errorHandling.o
quickbeam_optics.o: cosp_kinds.o cosp_errorHandling.o cosp_constants.o cosp_config.o mrgrnk.o array_lib.o optics_lib.o math_lib.o quickbeam.o
quickbeam_optics.o: cosp_kinds.o cosp_errorHandling.o cosp_constants.o cosp_config.o mrgrnk.o array_lib.o optics_lib.o math_lib.o quickbeam.o cosp_stats.o
scops.o : cosp_kinds.o cosp_errorHandling.o mo_rng.o
prec_scops.o : cosp_kinds.o cosp_config.o
cosp_utils.o : cosp_kinds.o cosp_config.o
Expand Down
103 changes: 103 additions & 0 deletions build/Makefile.rttov
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
# Makefile specifics for linking with RTTOV.
# From src/test/Makefile_examples
# -----------------------------------------------------------------------------

# You must update the following variables below according to the local RTTOV installation and compiler

# RTTOV_VERSION RTTOV version number
# RTTOVDIR root directory for RTTOV binaries, libraries, modules, includes

# FC compiler command name
# FFLAGS compiler specific flags: -I$(RTTOVDIR)/mod -I$(RTTOVDIR)/include are mandatory
# LDFLAGS_ARCH flags for linker

# BINDIR directory to store the binary file

# If RTTOV was compiled against the HDF5 or external LAPACK libraries this is
# handled automatically using the contents of Makefile.local.

# -----------------------------------------------------------------------------


# RTTOVDIR=../../
# Cheyenne version (with HDF5)
# RTTOVDIR=/glade/u/home/jonahshaw/w/RTTOV

# Derecho version (without HDF5). Note: You need a copy of Makefile.local in the RTTOVDIR directory in a build/ subdirectory
#RTTOVDIR=/glade/u/home/jonahshaw/w/RTTOV/alt_build

#FC=gfortran
#FFLAGS= -I$(RTTOVDIR)/mod -I$(RTTOVDIR)/include -fPIC -O3 -fopenmp -ffree-line-length-none
#FFLAGS= -I$(RTTOVDIR)/mod -I$(RTTOVDIR)/include -fPIC -O3 -fopenmp
#LDFLAGS_ARCH=-fopenmp

# Original Derecho settings
#RTTOVDIR=/glade/u/home/jonahshaw/w/RTTOV/alt_build
#FC=gfortran
#FFLAGS= -I$(RTTOVDIR)/mod -I$(RTTOVDIR)/include -fPIC -O3 -fopenmp
#LDFLAGS_ARCH=-fopenmp

# Derecho with debug changes (01/23/2024)
# RTTOVDIR=/glade/u/home/jonahshaw/w/RTTOV2
# Derecho with HDF
RTTOVDIR=/glade/u/home/jonahshaw/w/RTTOV2/hdf_build
FC=ifort
FFLAGS= -I$(RTTOVDIR)/mod -I$(RTTOVDIR)/include -fPIC -O3 -fopenmp
LDFLAGS_ARCH=-fopenmp

RTTOV_VERSION=13
EXT_BIN=.exe
EXT_OBJ=.o
EXT_LIB=.a
OBJDIR=$(RTTOVDIR)/obj
BINDIR=$(RTTOVDIR)/bin


#### Do not edit beyond this line ####

# JKS - Include settings used to build RTTOV
include $(RTTOVDIR)/build/Makefile.local

LIBDIR=$(RTTOVDIR)/lib

# JKS this if statement depends on the contents of Makefile.local
# but it doesn't seem to do anything.
ifdef LDFLAGS_HDF5
LIBS=\
$(LIBDIR)/librttov$(RTTOV_VERSION)_brdf_atlas$(EXT_LIB) \
$(LIBDIR)/librttov$(RTTOV_VERSION)_emis_atlas$(EXT_LIB) \
$(LIBDIR)/librttov$(RTTOV_VERSION)_mw_scatt$(EXT_LIB) \
$(LIBDIR)/librttov$(RTTOV_VERSION)_other$(EXT_LIB) \
$(LIBDIR)/librttov$(RTTOV_VERSION)_coef_io$(EXT_LIB) \
$(LIBDIR)/librttov$(RTTOV_VERSION)_hdf$(EXT_LIB) \
$(LIBDIR)/librttov$(RTTOV_VERSION)_parallel$(EXT_LIB) \
$(LIBDIR)/librttov$(RTTOV_VERSION)_main$(EXT_LIB)

LLIBS=-L$(LIBDIR) \
-lrttov$(RTTOV_VERSION)_brdf_atlas \
-lrttov$(RTTOV_VERSION)_emis_atlas \
-lrttov$(RTTOV_VERSION)_mw_scatt \
-lrttov$(RTTOV_VERSION)_other \
-lrttov$(RTTOV_VERSION)_coef_io \
-lrttov$(RTTOV_VERSION)_hdf \
-lrttov$(RTTOV_VERSION)_parallel \
-lrttov$(RTTOV_VERSION)_main
else
LIBS=\
$(LIBDIR)/librttov$(RTTOV_VERSION)_brdf_atlas$(EXT_LIB) \
$(LIBDIR)/librttov$(RTTOV_VERSION)_emis_atlas$(EXT_LIB) \
$(LIBDIR)/librttov$(RTTOV_VERSION)_mw_scatt$(EXT_LIB) \
$(LIBDIR)/librttov$(RTTOV_VERSION)_other$(EXT_LIB) \
$(LIBDIR)/librttov$(RTTOV_VERSION)_coef_io$(EXT_LIB) \
$(LIBDIR)/librttov$(RTTOV_VERSION)_parallel$(EXT_LIB) \
$(LIBDIR)/librttov$(RTTOV_VERSION)_main$(EXT_LIB)

LLIBS=-L$(LIBDIR) \
-lrttov$(RTTOV_VERSION)_brdf_atlas \
-lrttov$(RTTOV_VERSION)_emis_atlas \
-lrttov$(RTTOV_VERSION)_mw_scatt \
-lrttov$(RTTOV_VERSION)_other \
-lrttov$(RTTOV_VERSION)_coef_io \
-lrttov$(RTTOV_VERSION)_parallel \
-lrttov$(RTTOV_VERSION)_main
endif
14 changes: 3 additions & 11 deletions driver/run/cosp2_input_nl.txt
Original file line number Diff line number Diff line change
Expand Up @@ -82,15 +82,7 @@
!----------------------------------------------------------------------------------
!-------------- RTTOV inputs
!----------------------------------------------------------------------------------
rttov_Platform=1, ! satellite platform
rttov_Satellite=15, ! satellite
rttov_Instrument=5, ! instrument
rttov_Nchannels=3, ! Number of channels to be computed
rttov_Channels=1,2,3, ! Channel numbers (please be sure that you supply Nchannels)
rttov_Surfem=0.0,0.0,0.0, ! Surface emissivity (please be sure that you supply Nchannels)
rttov_ZenAng=50.0, ! Satellite Zenith Angle
CO2=5.241e-04, ! Mixing ratios of trace gases
CH4=9.139e-07,
N2O=4.665e-07,
CO=2.098e-07
! rttov_Ninstruments=1,
! rttov_instrument_namelists='instrument_nls/cosp2_rttov_inst1.txt',
rttov_verbose=.false.
/
14 changes: 3 additions & 11 deletions driver/run/cosp2_input_nl.um_global.txt
Original file line number Diff line number Diff line change
Expand Up @@ -82,15 +82,7 @@
!----------------------------------------------------------------------------------
!-------------- RTTOV inputs
!----------------------------------------------------------------------------------
rttov_Platform=1, ! satellite platform
rttov_Satellite=15, ! satellite
rttov_Instrument=5, ! instrument
rttov_Nchannels=3, ! Number of channels to be computed
rttov_Channels=1,2,3, ! Channel numbers (please be sure that you supply Nchannels)
rttov_Surfem=0.0,0.0,0.0, ! Surface emissivity (please be sure that you supply Nchannels)
rttov_ZenAng=50.0, ! Satellite Zenith Angle
CO2=5.241e-04, ! Mixing ratios of trace gases
CH4=9.139e-07,
N2O=4.665e-07,
CO=2.098e-07
! rttov_Ninstruments=1,
! rttov_instrument_namelists='instrument_nls/cosp2_rttov_inst1.txt',
rttov_verbose=.false.
/
14 changes: 3 additions & 11 deletions driver/run/cosp2_input_nl.um_global_model_levels.txt
Original file line number Diff line number Diff line change
Expand Up @@ -82,15 +82,7 @@
!----------------------------------------------------------------------------------
!-------------- RTTOV inputs
!----------------------------------------------------------------------------------
rttov_Platform=1, ! satellite platform
rttov_Satellite=15, ! satellite
rttov_Instrument=5, ! instrument
rttov_Nchannels=3, ! Number of channels to be computed
rttov_Channels=1,2,3, ! Channel numbers (please be sure that you supply Nchannels)
rttov_Surfem=0.0,0.0,0.0, ! Surface emissivity (please be sure that you supply Nchannels)
rttov_ZenAng=50.0, ! Satellite Zenith Angle
CO2=5.241e-04, ! Mixing ratios of trace gases
CH4=9.139e-07,
N2O=4.665e-07,
CO=2.098e-07
! rttov_Ninstruments=1,
! rttov_instrument_namelists='instrument_nls/cosp2_rttov_inst1.txt',
rttov_verbose=.false.
/
2 changes: 0 additions & 2 deletions driver/run/cosp2_output_nl.txt
Original file line number Diff line number Diff line change
Expand Up @@ -132,8 +132,6 @@
Llwpmodis=.true.,
Liwpmodis=.true.,
Lclmodis=.true.,
!- RTTOV
Ltbrttov=.false.,
! -CLOUDSAT precipitation frequency/occurence diagnostics
Lptradarflag0=.true.,
Lptradarflag1=.true.,
Expand Down
2 changes: 0 additions & 2 deletions driver/run/cosp2_output_nl.um_global_model_levels.txt
Original file line number Diff line number Diff line change
Expand Up @@ -132,8 +132,6 @@
Llwpmodis=.true.,
Liwpmodis=.true.,
Lclmodis=.true.,
!- RTTOV
Ltbrttov=.false.,
! -CLOUDSAT precipitation frequency/occurence diagnostics
Lptradarflag0=.false.,
Lptradarflag1=.false.,
Expand Down
Loading
Loading