Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/cd rt sout net cdf #66

Merged
merged 12 commits into from
Oct 3, 2023
Merged

Conversation

chengdang
Copy link
Contributor

@chengdang chengdang commented Sep 11, 2023

Description

This PR add new module to write CRTM output RTS into netCDF format:
CRTM_RTSolution_WriteFile_netCDF

! CRTM_RTSolution_WriteFile_netCDF

To use CRTM_RTSolution_WriteFile_netCDF, uncomment code block in check_crtm.f90:

! Uncomment to write crtm outputs in a netCDF file

There is no code changes to src/RTSolution/Common_RTSolution.f90, but a lot of auto space deletion due to code editor.

Issue(s) addressed

#62

Dependencies

None

Impact

None

@chengdang chengdang added enhancement New feature or request CRTM CRTM labels Sep 11, 2023
@chengdang chengdang self-assigned this Sep 11, 2023
@@ -62,7 +67,7 @@ MODULE CRTM_RTSolution_Define
PUBLIC :: CRTM_RTSolution_InquireFile
PUBLIC :: CRTM_RTSolution_ReadFile
PUBLIC :: CRTM_RTSolution_WriteFile

PUBLIC :: CRTM_RTSolution_WriteFile_netCDF
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

writefile_netcdf should live within CRTM_RTSolution_WriteFile -- you could pass an optional flag for it to determine if it's netCDF or not. I would not at all be against just defaulting to netCDF as the standard output format and removing the binary option.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can do that. Currently the CRTM_RTSolution_WriteFile is build as Binary output interface only. Let me try to modify it.

@@ -110,6 +115,71 @@ MODULE CRTM_RTSolution_Define
! File status on close after write error
CHARACTER(*), PARAMETER :: WRITE_ERROR_STATUS = 'DELETE'

! Output netCDF attributes
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How are these being used?

@@ -134,7 +204,7 @@ MODULE CRTM_RTSolution_Define
! Forward radiative transfer intermediate results for a single channel
! These components are not defined when they are used as TL, AD
! and K variables
REAL(fp) :: SSA_Max = ZERO ! Max Single Scattering Albedo in the profile
REAL(fp) :: SSA_Max = ZERO ! Max Single Scattering Albedo in the profile
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is this used for?

! Radiative transfer results for a single channel
REAL(fp) :: Radiance = ZERO
REAL(fp) :: Brightness_Temperature = ZERO
REAL(fp) :: Stokes(4)
REAL(fp) :: Stokes(4)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What are the contents of this?

@chengdang
Copy link
Contributor Author

Updated CRTM_RTSolution_WriteFile to write CRTM RTSolution object files in either Binary or NetCDF format.
The original CRTM_RTSolution_WriteFile has been modified as function CRTM_RTSolution_WriteFile_Binary.
Users may continue use CRTM_RTSolution_WriteFile for binary outputs, no changes to codes is needed.

@chengdang
Copy link
Contributor Author

@BenjaminTJohnson This branch is ready for merge for netCDF output only. We should perhaps discuss more on the ctests related updates, see #72.

All ctests passed but occasionally the channel subset test fails:
test_k_matrix_ChannelSubset_iasi_metop-b
I don't see any code change that may impact this mysterious test.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CRTM CRTM enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants