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

Model E SUBDDs read and interpret GEOS-Chem's derived types #29

Open
jwallwork23 opened this issue Aug 28, 2024 · 1 comment
Open

Model E SUBDDs read and interpret GEOS-Chem's derived types #29

jwallwork23 opened this issue Aug 28, 2024 · 1 comment
Assignees
Labels
deliverable1 Associated with deliverable 1 enhancement New feature or request

Comments

@jwallwork23
Copy link
Collaborator

jwallwork23 commented Aug 28, 2024

Set up equivalent SUBDDs to have Model E read GEOS-Chem's derived types and interpret them.

Towards Deliverable 1 (#23).

Background

GISS Model E has monthly diagnostics and sub-daily diagnostics (SUBDD). Both use an intermediate file representation, which is not ideal. However, the monthly diagnostics are generally thought to be implemented in a better way. SUBDDs can be either instantaneous (i) or averaged - these are indicated in the rundeck.

Existing code

Lee implemented a way to take GEOS-Chem concentrations and port them into the SUBDD (sub-daily diagnostics) code in GISS model E so they can be archived the way model E outputs them. However, this was done at version 12.9.3 of GEOS-Chem so it's possible that these need updating now that we're at version 14.4.3.

Plan

We need to mimic what Lee did for the species concentrations SpeciesConc diagnostic in CHEM_DRV.F90 and SUBDD.f for each of the diagnostic families. (Some will be similar to SpeciesConc in that they'll just be applied to all the chemical tracers, but others will have different patterns.)

Example: PARDF

There are a few examples in CHEM_DRV.F90 where Lee added some of the StateMet diagnostics, so that's an example of how you would go about adding diagnostics where there isn't one for every tracer in the model.

In model/CHEM_DRV.F90:

            ! Diffuse photsynthetically active radiation [W/m2]
            State_Met%PARDF       (II,JJ) = 0.82*srvissurf(i,j)*(1d0-fsrdir(i,j))*cosz1(i,j)          

This is where in the code we are taking the meteorology from the model and putting it into the GEOS-Chem derived type that holds the meteorology for GEOS-Chem.
Further down:

	if ( trim(subdd%name(k)) == "StateMet_PARDF" ) then
             DO J=J_0,J_1
             DO I=I_0,I_1
                II = I - I_0 + 1
                JJ = J - J_0 + 1
                sddarr2d(I,J) = State_Met%PARDF(II,JJ)
             ENDDO
             ENDDO
          endif
  • So if StateMet_PARDF is in the rundeck file in the sub-daily diagnostics then this is asking for it to be saved in the sub-daily diagnostics.
  • This is a 2D example but you'll also see 3D examples for the tracers themselves.
  • In that part of the code, there's only code for 3 or so of the StateMet parameters but in reality there's about 40 of them so you'd have to add a line for each one of them in order to save them and then we would need to make sure that if they're requested in the rundeck file then that they are also uncommented in the HISTORY.rc file.
  • We could uncomment everything in HISTORY.rc but that would mean that the model is going to allocate memory for and read and write into that memory for every single diagnostic that you requested, which would really slow things down.
  • We want to have the flexibility to request any of the diagnostics but in practice we only use the ones that we are interested in for a given simulation.
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

No branches or pull requests

3 participants
@jwallwork23 @AdelekeBankole and others