-
Notifications
You must be signed in to change notification settings - Fork 167
COSP-RTTOV integration with CAM #1327
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
base: cam_development
Are you sure you want to change the base?
Conversation
…OV plus swathing, memory checks, and OPAQ outputs. Needs cleaning!
Merged cospsimulator_intro.F90 and bld/configure by hand. Needs testing to see if COSP-RTTOV functionality is maintained, specifically regarding the treatment of cloud water/ice and effectively water and ice droplet sizes.
…ld dependencies, clean up obsolete cloud water fields.
…te descriptions. Remove commented line from bld/configure
…endation from cacraig
… cosp.F90 this array should be: "Height of bottom interface of atm layer(km). First level contains the bottom of the top layer. Last level contains the bottom of the surface layer." Current CAM interface includes the top of the top layer and needs to be corrected.
This reverts commit 496a7ec. This was a mistake too, I meant to revert the commit that merged recent CAM updates.
|
@cacraigucar I have now ported the COSP-RTTOV interface code to the cam_development branch. These changes make CAM compatible with the COSP-RTTOV branch that @dustinswales and I are currently reviewing before merging into the official COSPv2.0 repository. I've updated the CAM namelist options and logic as well. I made the following tests for performance:
This pull request also corrects an answer-changing model error (cospsimulator_intr.F90) in the assignment of the "hgt_matrix_half" field that COSPv2.0 uses. Per cosp.F90 this array should be:
The current CAM interface sets the first level as the top of the top layer and allocates the array as length nlay+1 instead of nlay. This changes all fields that use the lidar_simulator subroutine (CALIPSO, PARASOL, etc) and RTTOV outputs. I think that this PR is ready for a more detailed review! I will be traveling for work until August 28th and will be slow to respond during that time. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Review items for us to discuss (if needed) at our meeting this afternoon
- Also, we need to add a COSP_RTTOV regression test
| url = https://github.com/dustinswales/COSPv2.0 | ||
| fxrequired = AlwaysRequired | ||
| fxsparse = ../.cosp_sparse_checkout |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This needs to brought into an official COSP repo - it can not be on a personal fork
| Directory containing RTTOV libraries. For example: | ||
| /glade/u/home/jonahshaw/w/RTTOV2/hdfseries_build/lib/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps we should install the library in a TBD location on derecho.
| <!-- Swathing input control parameters. --> | ||
| <entry id="cosp_N_SWATHS_ISCCP" type="integer*10" category="cosp" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
During documentation of this feature, could we add a section on how to set up your own satellite (if it is easily done)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
| tauresx(i) = taux(i) + tauresx(i) - tauimpx(i) + tautmsx(i) + taubljx(i) | ||
| tauresy(i) = tauy(i) + tauresy(i) - tauimpy(i) + tautmsy(i) + taubljy(i) | ||
| tauresx(i) = taux(i) + tautmsx(i) + taubljx(i) + tauresx(i)- tauimpx(i) | ||
| tauresy(i) = tauy(i) + tautmsy(i) + taubljy(i) + tauresy(i)- tauimpy(i) | ||
| endif | ||
|
|
||
| else | ||
|
|
||
| tautotx(i) = taux(i) + tautmsx(i) | ||
| tautoty(i) = tauy(i) + tautmsy(i) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe this is indicative of a bad merge (this and the ChangeLog). Perhaps we can try merging to the current head of cam_development and see if they go away. We can do that when we meet this afternoon
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
| @@ -123,6 +125,7 @@ module cospsimulator_intr | |||
| ! ###################################################################################### | |||
| ! Default CAM namelist settings | |||
| ! ###################################################################################### | |||
| ! CAM | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Comment not needed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
| rttov_sfcmask(1:ncol) = 0 | ||
| do i=1,ncol | ||
| if ((cam_in%landfrac(i) > cam_in%ocnfrac(i)) .and. (cam_in%landfrac(i) > cam_in%icefrac(i))) then | ||
| rttov_sfcmask(i) = 1 | ||
| else if (cam_in%ocnfrac(i) > cam_in%icefrac(i)) then | ||
| rttov_sfcmask(i) = 0 | ||
| else | ||
| rttov_sfcmask(i) = 2 | ||
| end if | ||
| end do |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should probably double check this entire routine, and put sections like this within an if lrttov_sim construct
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
| cospstateIN%rttov_time(:,2) = (ncsec - 3600 * (ncsec / 3600)) / 60 ! Remainder divided by 60 seconds per minute | ||
| cospstateIN%rttov_time(:,3) = ncsec - (3600*cospstateIN%rttov_time(:,1)) - (60*cospstateIN%rttov_time(:,2)) ! Final remainder | ||
|
|
||
| cospstateIN%sza(1:ncol) = acosd(coszrs(1:ncol)) ! Hokey because we get the SZA by taking the arcosine of cos(sza), but this seems to be the variable the radiation scheme can pass. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Line > 133 characters - split into two or more
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
| where ((mr_lsliq(1:ncol,1:pver) > 0._r8) .and. (mr_ccliq(1:ncol,1:pver) > 0._r8)) | ||
| cospstateIN%DeffLiq(:,:) = 2._r8 * 1.0e6 * (mr_lsliq(1:ncol,1:pver) + mr_ccliq(1:ncol,1:pver)) / (mr_lsliq(1:ncol,1:pver) / reff_cosp(1:ncol,1:pver,I_LSCLIQ) + mr_ccliq(1:ncol,1:pver) / reff_cosp(1:ncol,1:pver,I_CVCLIQ)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Line > 133 characters - break into two or more
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
| call t_stopf("construct_cospstateIN") | ||
|
|
||
| ! Optical inputs | ||
| call t_startf("construct_cospIN") | ||
| call construct_cospIN(ncol, nscol_cosp, nlay, cospIN) | ||
| call construct_cospIN(ncol, nscol_cosp, nlay, rttov_Ninstruments, cospIN, emis_grey=1.0_r8) ! Apply unitary blackbody surface emissivity to be consistent with CESM physics |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Line > 133 characters - break into two or more
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
|
|
||
| ! RTTOV | ||
| if (lrttov_sim) then | ||
| do i=1,rttov_Ninstruments ! Not sure if this logical stuff is needed or not? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Address this comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
Merge pull request ESCOMP#1338 from kuanchihwang/staging/mpas-dycore-var-output
Closes #1324
Closes #1328
Requires cime6.1.106 or later
I have coupled the COSP-RTTOV satellite emulator with CAM and would like to pull it into the main code repository. This update to COSP significantly extends emulation capabilities and is described here: https://egusphere.copernicus.org/preprints/2025/egusphere-2025-169/
An important note: Integrating with COSP-RTTOV with CAM requires linking an external build of RTTOV to CESM during the build step and changes to CIME. This is further complicated by the fact that the RTTOV source code is free but only available to registered users and creating a new build is slow relative to a normal CESM build, so linking an existing RTTOV build during CESM build appears to be the best solution.
CIME fork here: https://github.com/jshaw35/cime/tree/cime6.0.217_httpsbranch02_cosprttov