Comments (8)
Per our discussion today, I went ahead and made a PR to make this change (#30).
from shield_physics.
Hi, Spencer. I am in favor of this change. Given the nature of SHiELD I think it is OK to just make the data structure a public object rather than go to the work of creating an API of getters and setters. (We could place a label on it: ``No user serviceable parts inside''.)
I will defer to @bensonr @laurenchilutti @linjiongzhou as to whether this is the best approach but I am in favor of it.
Thanks
Lucas
from shield_physics.
@spencerkclark - I haven't looked at the code in quite a few years, but the FV3GFS_io.F90 Diag type should be aliased to the IPD_Diag and available at the atmos_model_mod (atmos_model.F90) level of the model.
from shield_physics.
Thanks @bensonr. This is indeed the case in our old fork of FV3GFS (which is how we've set things up there), but in SHiELD I think FV3GFS_io_mod.Diag
is (somewhat confusingly) separate from atmos_model_mod.IPD_Diag
. atmos_model_mod.IPD_Diag
is populated in physics_diag_layer.diag_populate
, while FV3GFS_io_mod.Diag
is populated in FV3GFS_io_mod.gfdl_diag_register
, and these two data structures are not populated with the same data.
FV3GFS_io_mod.Diag
is what is actually used in writing out diagnostics in FV3GFS_io_mod.gfdl_diag_output
. Conversely, while it gets populated in the IPD_initialize
routine, I'm not sure if atmos_model_mod.IPD_Diag
ever ends up being used for anything meaningful within SHiELD.
I'm guessing there is a story behind this that I am not familiar with.
from shield_physics.
I'm just a user of these functions, so I'll leave it to Rusty and Lauren to determine the most suitable approach.
Linjiong
from shield_physics.
It's a little challenging to tease out the abstractions here. This IPD_Diag
of IPD_Diag_type
holds a lot of metadata for each variable, each of which then includes a pointer to data within Diag
of intdiag_type
which is an alias of GFS_diag_type
. The GFS_diag_type
does not hold metadata, just the individual datasets, whereas IPD_Diag is a generic container which can hold a number of different datasets.
In any case, I believe IPD_Diag
s are just for I/O and do not control the model state itself, so reading it should be safe as long (as you said) you don't read from a variable which is being accumulated.
All of this should be pretty similar between FV3GFS and the most recent version of SHiELD since the IPD layer has not been heavily modified over the years.
If you wish to actually override data, such as in the surface datasets, that is a different story. I think sfcprop_type => GFS_sfcprop_type
is what you want to modify.
from shield_physics.
This
IPD_Diag
ofIPD_Diag_type
holds a lot of metadata for each variable, each of which then includes a pointer to data withinDiag
ofintdiag_type
which is an alias ofGFS_diag_type
. TheGFS_diag_type
does not hold metadata, just the individual datasets, whereas IPD_Diag is a generic container which can hold a number of different datasets.
Yes, I am familiar with how all of this works. The point I am bringing up is that in SHiELD there is another (non-identical) version of this metadata infrastructure (including some type definitions) in FV3GFS_io.F90
(Diag
<-> IPD_Diag
; gfdl_diag_type
<-> IPD_diag_type
; Diag
is populated here <-> IPD_Diag
is populated here). There is overlap between the diagnostics that are defined in FV3GFS_io.F90
and those that are defined in GFS_diagnostics.F90
, but they are not the same, and the source of truth for SHiELD is in Diag
in FV3GFS_io.F90
, and not IPD_Diag
.
If you wish to actually override data, such as in the surface datasets, that is a different story. I think
sfcprop_type => GFS_sfcprop_type
is what you want to modify.
Yes, this is the same as in FV3GFS, and (among other ways) is how we modify variables in the physics, which is enabled by NOAA-GFDL/atmos_drivers#26. We indeed only care about "getting" data in the case of these diagnostics fields.
from shield_physics.
Glad we can move forward on this.
from shield_physics.
Related Issues (15)
- New release breaks existing docker build using GFDL_atmos_cubed_sphere main HOT 2
- Release 202204 Segmentation fault vs previous successful run HOT 17
- Requested aerosol data file "INPUT/aerosol.dat" not found! HOT 3
- gnu.mk file OPENMP, Undefined reference to `omp_get_ ... HOT 2
- 202204 release - exited on signal 11 (Segmentation fault) HOT 11
- GFS physics radiation: solar hour incorrect if model initialized not on the hour HOT 3
- atmos_drivers and simple_coupler need to be removed
- Microphysics always initialized with hydrostatic=.true. HOT 2
- Recommended Issues to Address from PR #22 HOT 2
- `ccnorm` namelist parameter ignored in when `cloud_gfdl` and `pdfcld` are true
- Units for fhcyc in inline comment incorrect?
- how to produce diagnostic winds at time step 0? HOT 8
- Slab ocean Q-flux is read in from file, but not propagated to `Sfcprop%qfluxadj`
- Refresh README to include attribution for external code added after 2017
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from shield_physics.