-
Notifications
You must be signed in to change notification settings - Fork 7
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
updates to noresm_develop to be close as possible to noresm2_3_develop #13
Merged
gold2718
merged 4 commits into
NorESMhub:noresm_develop
from
mvertens:feature/update_noresm_develop_to_noresm2_3_develop
Feb 20, 2024
Merged
Changes from 3 commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -99,7 +99,7 @@ module oslo_aero_coag | |
real(r8), parameter :: temperatureLookupTables = 293.15_r8 !Temperature used in look up tables | ||
real(r8), parameter :: mfpAir = 63.3e-9_r8 ![m] mean free path air | ||
real(r8), parameter :: viscosityAir = 1.983e-5_r8 ![Pa s] viscosity of air | ||
real(r8), parameter :: rhoh2o = 1000._r8 ! Density of water | ||
real(r8), parameter :: rhoh2o = 1000._r8 !Density of water | ||
|
||
!================================================================ | ||
contains | ||
|
@@ -202,14 +202,14 @@ subroutine initializeCoagulation(rhob,rk) | |
call calculateCoagulationCoefficient(CoagulationCoefficient & !O [m3/s] coagulation coefficient | ||
, rk(modeIndexCoagulator) & !I [m] radius of coagulator | ||
, rhob(modeIndexCoagulator) & !I [kg/m3] density of coagulator | ||
, rhob(modeIndexReceiver) ) !I [kg/m3] density of receiver | ||
, rhob(modeIndexReceiver) ) !I [kg/m3] density of receiver | ||
|
||
!Save values | ||
CoagCoeffModeAdd(iReceiverMode,:) = CoagulationCoefficient(:) | ||
|
||
end do !receiver modes | ||
|
||
! Onl one receivermode for cloud coagulation (water) | ||
! Only one receivermode for cloud coagulation (water) | ||
do iCoagulatingMode = 1,numberOfCoagulatingModes | ||
|
||
!Index of the coagulating mode (0-14), see list above | ||
|
@@ -221,7 +221,7 @@ subroutine initializeCoagulation(rhob,rk) | |
call calculateCoagulationCoefficient(CoagulationCoefficient & !O [m3/s] coagulation coefficient | ||
, rk(modeIndexCoagulator) & !I [m] radius of coagulator | ||
, rhob(modeIndexCoagulator) & !I [kg/m3] density of coagulator | ||
, rhoh2o ) !I [kg/m3] density of receiver | ||
, rhoh2o ) !I [kg/m3] density of receiver | ||
|
||
!Save values | ||
K12Cl(iCoagulatingMode,:) = CoagulationCoefficient(:) | ||
|
@@ -361,8 +361,8 @@ subroutine calculateCoagulationCoefficient(CoagulationCoefficient, modeRadius, m | |
real(r8) :: mfv1 ![m] mean free path particle | ||
real(r8) :: mfv2 ![m] mean free path particle | ||
|
||
! coagulation coefficient for SO4 (Brownian, Fuchs form) | ||
!Loop through indexes in look-up table | ||
! coagulation coefficient for SO4 (Brownian, Fuchs form) | ||
! Loop through indexes in look-up table | ||
do i=1,nBinsTab | ||
c1=calculateThermalVelocity(rBinMidPoint(i), receiverDensity) !receiving size | ||
c2=calculateThermalVelocity(modeRadius, modeDensity) !coagulating aerosol | ||
|
@@ -379,14 +379,13 @@ subroutine calculateCoagulationCoefficient(CoagulationCoefficient, modeRadius, m | |
|
||
g12=sqrt(g1**2+g2**2) | ||
|
||
!Coagulation coefficient of receiver size "i" with the coagulating | ||
!mode "kcomp" | ||
!Coagulation coefficient of receiver size "i" with the coagulating mode "kcomp" | ||
CoagulationCoefficient(i) = & | ||
4.0_r8*pi*(rBinMidPoint(i)+modeRadius)*(diff1+diff2) & | ||
/((rBinMidPoint(i)+modeRadius)/(rBinMidPoint(i)+modeRadius+g12) & | ||
+(4.0_r8/c12)*(diff1+diff2)/(modeRadius+rBinMidPoint(i))) | ||
|
||
enddo ! loop on imax | ||
enddo | ||
end subroutine calculateCoagulationCoefficient | ||
|
||
!================================================================ | ||
|
@@ -495,9 +494,9 @@ subroutine coagtend(q, pmid, pdel, temperature, delt_inverse, ncol, lchnk) | |
|
||
!process modes don't change mode except so4 condensate which becomes coagulate instead | ||
!assumed to have same sink as MODE_IDX_OMBC_INTMIX_AIT | ||
if( .NOT. is_process_mode(l_index_donor,.true.) & | ||
.OR. ( (l_index_donor.eq.chemistryIndex(l_so4_a1)) & | ||
.AND. modeIndexCoagulator .eq. MODE_IDX_OMBC_INTMIX_COAT_AIT) ) then | ||
if( .NOT. is_process_mode(l_index_donor,.true.) .or. & | ||
( (l_index_donor == chemistryIndex(l_so4_a1)) .and. & | ||
modeIndexCoagulator == MODE_IDX_OMBC_INTMIX_COAT_AIT) ) then | ||
|
||
!Done summing total loss of this coagulating specie | ||
totalLoss(i,k,l_index_donor) = coagulationSink & !loss rate for a mode in [1/s] summed over all receivers | ||
|
@@ -515,16 +514,16 @@ subroutine coagtend(q, pmid, pdel, temperature, delt_inverse, ncol, lchnk) | |
end do ! k | ||
|
||
|
||
!UPDATE THE TRACERS AND DO DIAGNOSTICS | ||
! UPDATE THE TRACERS AND DO DIAGNOSTICS | ||
do iCoagulator = 1, numberOfCoagulatingModes | ||
do ispecie = 1, getNumberOfTracersInMode(coagulatingMode(iCoagulator)) | ||
|
||
l_index_donor = getTracerIndex(coagulatingMode(iCoagulator) , ispecie ,.true.) | ||
|
||
!so4_a1 is a process mode (condensate), but is still lost in coagulation | ||
if( .NOT. is_process_mode(l_index_donor, .true.) & | ||
.OR. ( (l_index_donor.eq.chemistryIndex(l_so4_a1)) .AND. & | ||
coagulatingMode(iCoagulator) .eq. MODE_IDX_OMBC_INTMIX_COAT_AIT) ) then | ||
if( .NOT. is_process_mode(l_index_donor, .true.) .or. & | ||
( (l_index_donor == chemistryIndex(l_so4_a1)) .and. & | ||
coagulatingMode(iCoagulator) == MODE_IDX_OMBC_INTMIX_COAT_AIT) ) then | ||
|
||
l_index_donor = getTracerIndex(coagulatingMode(iCoagulator) , ispecie,.true. ) | ||
|
||
|
@@ -639,13 +638,14 @@ subroutine clcoag(q, pmid, pdel, temperature, cldnum, cldfrc, delt_inverse, ncol | |
|
||
!process modes don't change mode except so4 condensate which becomes coagulate instead | ||
!assumed to have same sink as MODE_IDX_OMBC_INTMIX_AIT | ||
if( .NOT. is_process_mode(l_index_donor,.true.) & | ||
.OR. ( (l_index_donor.eq.chemistryIndex(l_so4_a1)) .AND. modeIndexCoagulator .eq. MODE_IDX_OMBC_INTMIX_COAT_AIT) ) then | ||
if( .NOT. is_process_mode(l_index_donor,.true.) .or. & | ||
( (l_index_donor == chemistryIndex(l_so4_a1)) .and. & | ||
modeIndexCoagulator == MODE_IDX_OMBC_INTMIX_COAT_AIT) ) then | ||
|
||
!Done summing total loss of this coagulating specie | ||
cloudLoss(i,k,l_index_donor) = coagulationSink & !loss rate for a mode in [1/s] summed over all receivers | ||
* cldfrc(i,k)*q(i,k,l_index_donor) & !* mixing ratio ==> MMR/s | ||
/ delt_inverse ! seconds ==> MMR | ||
cloudLoss(i,k,l_index_donor) = coagulationSink & !loss rate for a mode in [1/s] summed over all receivers | ||
* cldfrc(i,k)*q(i,k,l_index_donor) & !* mixing ratio ==> MMR/s | ||
/ delt_inverse !/ seconds ==> MMR | ||
|
||
!Can not loose more than we have | ||
! At present day assumed lost within the cloud | ||
|
@@ -659,15 +659,15 @@ subroutine clcoag(q, pmid, pdel, temperature, cldnum, cldfrc, delt_inverse, ncol | |
end do ! i | ||
end do ! k | ||
|
||
!UPDATE THE TRACERS AND DO DIAGNOSTICS | ||
! UPDATE THE TRACERS AND DO DIAGNOSTICS | ||
do iCoagulator = 1, numberOfCoagulatingModes | ||
do ispecie = 1, getNumberOfTracersInMode(coagulatingMode(iCoagulator)) | ||
l_index_donor = getTracerIndex(coagulatingMode(iCoagulator) , ispecie ,.true.) | ||
|
||
!so4_a1 is a process mode (condensate), but is still lost in coagulation | ||
if( .NOT. is_process_mode(l_index_donor, .true.) & | ||
.OR. ( (l_index_donor.eq.chemistryIndex(l_so4_a1)) .AND. coagulatingMode(iCoagulator) & | ||
.eq. MODE_IDX_OMBC_INTMIX_COAT_AIT) ) then | ||
if( .NOT. is_process_mode(l_index_donor, .true.) .or. & | ||
( (l_index_donor == chemistryIndex(l_so4_a1)) .and. & | ||
coagulatingMode(iCoagulator) == MODE_IDX_OMBC_INTMIX_COAT_AIT) ) then | ||
Comment on lines
+668
to
+670
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There are parentheses around the first equality check but not the second one. Something to fix someday? |
||
|
||
l_index_donor = getTracerIndex(coagulatingMode(iCoagulator), ispecie, .true.) | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
There are parentheses around the first equality check but not the second one. Something to fix someday?