Skip to content

Evaporation output #282

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

Open
Bkemanga opened this issue Apr 30, 2024 · 10 comments
Open

Evaporation output #282

Bkemanga opened this issue Apr 30, 2024 · 10 comments

Comments

@Bkemanga
Copy link

I was wondering if it would be possible to calibrate the GLM model lakeEnsemblr using observed evaporation.

@jorritmesman
Copy link
Collaborator

Hi,
No, it's sadly not possible to run an automatic calibration with anything else than temperature in LakeEnsemblR, at least for now. I would recommend to set up a latin hypercube grid with the parameters that you want to calibrate, run GLM iteratively over these parameters, and each step calculate your goodness-of-fit metric(s), so that you can select the best fit in the end. You can partially follow the cali_ensemble.R script, perhaps, but it will be mostly something that you have to create yourself, I'm afraid.

The key function to do this, also used in cali_ensemble, is the Latinhyper function from the FME package.

@Bkemanga
Copy link
Author

Bkemanga commented Apr 30, 2024

Thanks very much @jorritmesman
One quick question: is it possible to run Ensemble with GLM only for 1000? also, I have only temperature observation for the lake surface (depth =0m, that is, surface water temperature), Is it possible to calibrate the model using Cali_ensemble?

cali_ensemble(config_file, model = c("GLM"),
cmethod = "LHC", num = 1000, out_f = "calibration")

@Bkemanga
Copy link
Author

I will appreciate your guidance as am trying to replicate this for mine pit lake.

@jorritmesman
Copy link
Collaborator

You are able to run more iterations; there is no maximum limit for the num argument (other than runtime on your computer).

Yes, you should be able to use cali_ensemble to calibrate your lake. However, having only surface water temperature is of course a bit restrictive to get stratification patterns correct, because you have no data on that. But at least theoretically, it should be possible.

@Bkemanga
Copy link
Author

Thanks @jorritmesman.
Is it possible to run the model for let's say 10yrs but choose only maybe one year for calibration? This is because I have meteorological data for 10 yrs. and only 1 yrs. of observation data. Can I specify the time index in the cali_ensamble function?

@jorritmesman
Copy link
Collaborator

Yes, that will work fine. You don't need to specify anything in the cali_ensemble function call, but just make sure that the observation file that you refer to only has observations in the period that you want to use for calibration.

@Bkemanga
Copy link
Author

Bkemanga commented May 2, 2024

I did manage to set my lakemodel but when i rune the model I get this error

Run ensemble lake models

run_ensemble("NPMEnsemblR.yaml", model = c("GLM"))
Loading water temperature observations...[2024-05-02 04:04:54.365859]
Finished loading water temperature observations![2024-05-02 04:04:54.367365]
Running models... (Have you tried parallelizing?) [2024-05-02 04:04:54.378466]
GLM run is complete! [2024-05-02 04:04:54.402798]
Error in R_nc4_open: No such file or directory
Error in nc_open(file, readunlim = TRUE) :
Error in nc_open trying to open file ./GLM/output/output.nc (return_on_error= FALSE )

@jorritmesman
Copy link
Collaborator

It looks like GLM crashed (no output file was generated). You can investigate what went wrong by going to your GLM folder and using GLM3r::run_glm(verbose = TRUE)

@Bkemanga
Copy link
Author

Bkemanga commented May 7, 2024

@jorritmesman I did manged to figure out the error after using GLM3r::run_glm(verbose = TRUE) as you did advice.
Now another problem, when using .yaml file to export the the setting using export_config, the exported meteo data does generate longwave radiation data but I would preferer to use Cloud cover direct when run GLM so that i can specify different cloud_mode. In short i don't want the export_config to calculate longwave.
image

image
as you can see the glm meteo file does have longwave which is calculated but I would prefer Cloud so that i can change cloud mode

@robertladwig
Copy link
Member

Hi @Bkemanga, I think the best way forward for you is to manually add your cloud cover data to the generated GLM meteorology file. LER currently tries to set up all hydrodynamic models in a similar way, which is why it uses observed long-wave radiation instead of inferring long-wave from cloud cover. Keep in mind that you would need to change rad_mode in your GLM nml-file to inform the model to not use provided long-wave data (see screenshot).

Skærmbillede 2024-05-07 114122

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants