Skip to content

Model E SUBDDs read and interpret GEOS-Chem StateMet#102

Open
joewallwork wants to merge 27 commits intodevelopfrom
29_subdd-statediag-take2
Open

Model E SUBDDs read and interpret GEOS-Chem StateMet#102
joewallwork wants to merge 27 commits intodevelopfrom
29_subdd-statediag-take2

Conversation

@joewallwork
Copy link
Copy Markdown
Collaborator

@joewallwork joewallwork commented Mar 18, 2025

Towards #29.
Closes #103.
Supersedes #84.

I separated out the previous PR into two. PR #101 adds the HISTORY.rc file for GISS Model E. This PR contains the code changes required for having Model E's SUBDDs read and interpret the StateMet components of GEOS-Chem's State_Diag derived type.

[To create this branch, I rebased the history-rc-file-for-model-e branch on top of develop, dropping commits related to the HISTORY.rc file.]

Comment on lines +287 to +293
State_Met%GWETTOP (II,JJ) = 0.0
if ( fearth(i,j) .gt. 0 ) then
State_Met%GWETROOT (II,JJ) = (wearth(i,j)+aiearth(i,j))/(wfcs(i,j)+1e-20)
State_Met%GWETTOP (II,JJ) = (wearth(i,j)+aiearth(i,j))/(wfcs(i,j)+1e-20)
else
State_Met%GWETROOT (II,JJ) = 1 ! Set to 1 over oceans to match MERRA-2
State_Met%GWETTOP (II,JJ) = 1 ! Set to 1 over oceans to match MERRA-2
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

This seemed to me to be a typo.

Comment on lines +243 to +246
! Convective cloud depth [m]
State_Met%CONV_DEPTH (II,JJ) = cth_save(i,j)
Copy link
Copy Markdown
Collaborator Author

@joewallwork joewallwork Mar 18, 2025

Choose a reason for hiding this comment

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

Review task: check this is the right array to use.

Comment on lines +249 to +252
! Lightning flash density [km-2 s-1]
State_Met%FLASH_DENS (II,JJ) = flash_dens(i,j)
Copy link
Copy Markdown
Collaborator Author

@joewallwork joewallwork Mar 18, 2025

Choose a reason for hiding this comment

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

Review task: check this is the right array to use.

@joewallwork joewallwork force-pushed the 29_subdd-statediag-take2 branch from 2892336 to 145c1c4 Compare March 18, 2025 15:01
Comment on lines +442 to +462
! Dry air mass [kg]
State_Met%AD (II,JJ,K) = mma(i,j,k)

! Dry air density [kg m-3]
! NOTE: Formula from DIFFG function definition in model/DRYDEF.f with pressure PMID
State_Met%AIRDEN (II,JJ,K) = PMID(II,JJ,K)*avog*bygasc/t(i,j,k)*pk(k,i,j)

! Volume of grid box [m3]
! TODO: State_Met%AIRVOL (II,JJ,K) = ???
! NOTE: We could calculate this using State_Grid%XEdge and State_Grid%YEdge but what
! about the edge cases?

! Water vapor mixing ratio (w/r/t dry air)
! NOTE: QSAT is a function defined in model/shared/Utilities.F90
State_Met%AVGW (II,JJ,K) = QSAT(t(i,j,k)*pk(k,i,j),LHE,pmid(k,i,j))

! Grid box height [m]
! NOTE: This is the geopotential height from Model E. Do we need to deduce the heights
! from the GEOS-Chem State_Grid derived type?
State_Met%BXHEIGHT (II,JJ,K) = gz(i,j,k)
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Review task: check these are the right arrays to use and suggest what to do for the case of AIRVOL.

Comment on lines +551 to +561
! Potential temperature [K]
State_Met%THETA (II,JJ,K) = t(i,j,k)
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Review task: check this is the right array to use.

Comment on lines +473 to +483
! Delta-pressure across grid box(wet air) [hPa]
! NOTE: Based on EdgePressure_GISS and DeltPressure_GISS from model/FV_UTILS.f
! NOTE: Some of the conditional logic related to the RESOLUTION module was dropped
! here because we aren't using GISS grids.
! NOTE: Surely the calculation is flawed at the top level?
! NOTE: Uses PMID for pressure, which probably isn't right.
State_Met%DELP (II,JJ,K) = (SIGE(K)*PMID(II,JJ,K) - SIGE(K+1)*PMID(II,JJ,K))

! Delta-pressure across grid box (dry air) [hPa]
! TODO: State_Met%DELPDRY (II,JJ,K) = ???

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Review task: check these are the right arrays to use and suggest what to do for the case of DELPDRY.

Comment on lines +509 to +510
! Pressure (w/r/t dry air) at level edges [hPa]
! TODO: State_Met%PEDGE_DRY (II,JJ,K) = ???
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Review task: suggest array to use here.

@joewallwork joewallwork changed the title Model E SUBDDs read and interpret GEOS-Chem State_Diag Model E SUBDDs read and interpret GEOS-Chem StateMet Mar 18, 2025
@joewallwork joewallwork requested a review from ltmurray March 18, 2025 15:58
@joewallwork joewallwork marked this pull request as ready for review March 18, 2025 15:58
@joewallwork joewallwork linked an issue Mar 18, 2025 that may be closed by this pull request
@joewallwork joewallwork changed the base branch from 30_history to develop March 25, 2025 15:59
@joewallwork joewallwork force-pushed the 29_subdd-statediag-take2 branch from 4050105 to 85ee764 Compare March 25, 2025 16:02
@joewallwork
Copy link
Copy Markdown
Collaborator Author

[Rebased on top of develop, dropping the changes from #101, which is no longer needed.

* add units for prodloss fields
* define prodloss 3d fields
* hook up prodloss 3d fields

* Loop cases for prodloss SUBDD setup (#116)

* Convert Model E -> GEOS-Chem transfers to TODOs
* Use valid derived type; loop over products and losses
* Loops over products and losses for data transfer

---------

Co-authored-by: Joe Wallwork <jw2423@cam.ac.uk>
Co-authored-by: Adeleke Bankole <ab3191@login-q-2.data.cluster>
Comment on lines +627 to +683
! Loop over all products
do n=1,nprod
! TODO: State_Diag%Prod(n,II,JJ,K) = ???
end do ! products loop

! Production of hydrophilic black carbon from hydrophobic black carbon [kg]
! TODO: State_Diag%ProdBCPIfromBCPO (II,JJ,K) = ???

! Production of hydrophilic organic carbon from hydrophobic organic carbon [kg]
! TODO: State_Diag%ProdOCPIfromOCPO (II,JJ,K) = ???

! Production of HMS from aqueous reaction of SO2 and HCHO in clouds [kg S s-1]
! TODO: State_Diag%ProdHMSfromSO2andHCHOinCloud (II,JJ,K) = ???

! Production of SO2 and HCHO from aqueous reaction of HS and OH- in clouds [kg S s-1]
! TODO: State_Diag%ProdSO2andHCHOfromHMSinCloud (II,JJ,K) = ???

! Production of SO4 from aqueous oxidation of O3 in clouds [kg S s-1]
! TODO: State_Diag%ProdSO4fromHMSinCloud (II,JJ,K) = ???

! Production of SO4 from aqueous oxidation of H2O2 in clouds [kg S s-1]
! TODO: State_Diag%ProdSO4fromH2O2inCloud (II,JJ,K) = ???

! Production of SO4 from aqueous oxidation of O2 from metals in cloud [kg S]
! TODO: State_Diag%ProdSO4fromO2inCloudMetal (II,JJ,K) = ???

! Production of SO4 from aqueus oxidation of O3 in cloud [kg S s-1]
! TODO: State_Diag%ProdSO4fromO3inCloud (II,JJ,K) = ???

! Production of SO4 from O3 in sea salt [kg S s-1]
! TODO: State_Diag%ProdSO4fromO3inSeaSalt (II,JJ,K) = ???

! Production of SO4 from aqueus oxidation of HOBr in clouds [kg S s-1]
! TODO: State_Diag%ProdSO4fromHOBrInCloud (II,JJ,K) = ???

! Production of SO4 from sulphur production rate of O3 [kg S s-1]
! TODO: State_Diag%ProdSO4fromSRO3 (II,JJ,K) = ???

! Production of SO4 from sulphur production rate of HOBr + O3 [kg S s-1]
! TODO: State_Diag%ProdSO4fromSRHObr (II,JJ,K) = ???

! Production of SO4 from aqueous phase SO3 loss by OH [kg S s-1]
! TODO: State_Diag%ProdSO4fromO3s (II,JJ,K) = ???

! Loop over all losses
do n=1,nloss
! TODO: State_Diag%Loss(n,II,JJ,K) = ???
end do ! losses loop

! Loss of HNO3 on sea salt aerosols [kg s-1]
! TODO: State_Diag%LossHNO3onSeaSalt (II,JJ,K) = ???

! Production of CO from CH4 [kg s-1]
! TODO: State_Diag%ProdCOfromCH4 (II,JJ,K) = ???

! Production of CO from NMVOCs SO3 - loss by OH [kg s-1]
! TODO: State_Diag%ProdCOfromNMVOC (II,JJ,K) = ???
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

The Model E arrays for these diagnostics still need to be determined.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

deliverable1 Associated with deliverable 1 enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Model E SUBDDs read and interpret GEOS-Chem StateMet fields

2 participants